My Python sandbox project to try and learn some technologies, including
- Cython
- cibuildwheel
- GitHub Actions
- later maybe: scikit-build
- One cannot do it without a setup.py because of the extra Cython build step, but people might work on this: pypa/setuptools#2220
- Python Packaging User Guide - Packaging Python Projects
- Python Packaging User Guide - Packaging binary Extensions
- This led me to cibuildwheel
- Setuptools User Guide
- There is a tip for when using Cython in combination with setuptools: Distributing Extensions compiled with Cython
- This is why don't use
cythonize()
in mysetup.py
.
- This is why don't use
- There is a tip for when using Cython in combination with setuptools: Distributing Extensions compiled with Cython
- Scikit HEP - On Packaging
- There is also useful information on how to use GitHub Actions
- Cython - Interfacing with External C Code
- This helps to understand how to call C code from Cython code.
- Python Documentation - Distributing Python Modules (Legacy version) - 2. Writing the Setup Script
- As I could not find any documentation about the
setuptools.Extension
class I assume it is working the same way thedistutils.core.Extension
works. - You may also have a look at https://docs.python.org/3/distutils/apiref.html#distutils.core.Extension
- As I could not find any documentation about the
- Tests are done locally with tox
- install tox with pip(x)
- install all Python versions using pyenv
- install pyenv: https://github.com/pyenv/pyenv#automatic-installer
* install on ubuntu: libffi-dev liblzma-dev zlib1g zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev libncurses5-dev libncursesw5-dev libreadline-dev
- further help on pyenv: https://realpython.com/intro-to-pyenv/
- download and build needed Python versions
pyenv install 3.7 3.8 3.9
- activate the pyenv versions
pyenv local 3.7 3.8 3.9
- install pyenv: https://github.com/pyenv/pyenv#automatic-installer
* install on ubuntu: libffi-dev liblzma-dev zlib1g zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev libncurses5-dev libncursesw5-dev libreadline-dev
- run
tox
inside the tests directory to test the project against all specified Python versions.