Building and installing

From PyPI

Binary Python wheels are built and distributed on PyPI for the following Python versions:

Architecture

Windows

Linux

MacOS

x86 (CPython)

N/A

N/A

N/A

x64 (CPython)

3.9-3.13

3.9-3.13

3.9-3.13

x64 (PyPy)

N/A

3.9-3.10

N/A

On these systems python3 -m pip install endplay will install these pre-built wheels, otherwise it will attempt to install from the source distribution which requires a C++ compiler on your system. Note that endplay requires Python 3.7+.

The version of the library available on PyPI may be older than the current status of the repo, this is to ensure stability of these builds. For access to the latest bug fixes and preview features, you can install directly from the GitHub repo with python3 -m pip install +git:https://github.com/dominicprice/endplay

From source

To install from source to your system Python run

# Clone repo and submodules
git clone --recursive https://github.com/dominicprice/endplay.git
cd endplay
python3 -m pip install .

For development

endplay uses poetry to manage builds. Poetry can be install on your system using pip/pipx:

python3 -m pip install poetry
# or
pipx install poetry

pipx installs packages into an isolated environment and creates shims for all the package’s executable scripts in your local PATH. If you have pipx on your system you should prefer it for managing your poetry distribution, see poetry/pipx’s docs for more information.

If you want to build the binary wheels for your system, you can use poetry’s build command. This will create an isolated environment when collecting packages so you do not need to perform this in a virtual environment.

cd /path/to/endplay
poetry build -f wheel # generates dist/endplay-<VERSIONSUFFIX>.whl

To develop endplay, you can use poetry’s install command to install endplay and all the dependencies into a virtual environment:

cd /path/to/endplay
poetry install

If you modify the C extension, you will need to rerun poetry install for the virtual environment to pick up the changes.

Building the documentation

The documentation is semi-auto generated with sphinx. To build it, ensure that endplay is installed and then cd into the root directory and then run

cd docs
make html # or latex, or whatever output format you want

The documentation will be built in the build directory.

Running the test suite

The test suite is implemented with the unittest library and can be run from the root directory with

python3 -m pytest