Installing PyEVSpace#
Pip#
The best way to install PyEVSpace is to download it from PyPi into your
virtual environment
using pip
pip install pyevspace
From source#
Installing From source#
To install the package from the current source code, first clone the repo to your machine
git clone https://github.com/qbizzle68/pyevspace.git
Then to install run
pip install <path-to-cloned-repo>
Note
The -e or --editable flag can be used to install the
package as editable, however this only affects pure python files. Since any
changes made to the source code need to be re-compiled, this only affects
the __init__.py file which may or may not be useful for you.
Building In Place#
While not recommended, it is possible to build the package inplace with:
python setup.py build_ext --inplace --build-lib <path-to-build-pyevspace>
the package will be built at <path-to-build-pyevspace>.
Note
The extension module is named _pyevspace.pyd, and since building
in place does not include the __init__.py file, import mechanics
will be different. For example, if normally importing Vector
using from pyevspace import Vector, you now need
from pyevspace._pyevspace import Vector.
Testing#
To test the package, first clone the source repo. Then run
pytest
which will output the test results to the console. The test source code includes
two smaller extension modules to test PyEVSpace’s C API capsule for C and C++
compatibility for others wanting to include and access PyEVSpace from their
own extension modules. To skip building and running these tests, pass the
--skip-capsule flag to pytest when invoking the tests.
Tox#
PyEVSpace currently supports all actively maintained versions of Python, which includes 3.10 to 3.14. The package is configured to test all versions (if installed on your machine) using Tox. Running Tox with
tox
will test all available supported versions on your machine, as well as linting
project python files using flake8. To test only a specific version of python
(or the linter) specify the version using the -e flag when invoking
Tox. For example, to only test PyEVSpace built for python 3.13, use
tox -e 3.13
The available environments that can be run using Tox are “3.10”, “3.11”, “3.12”, “3.13”, “3.14”, “lint”, and “stubtest”.