Pre-requisites
- Python 3.8 and up.
- Ensure
cargo build
works fine. - There are two ways of running generating bindings. This describes the steps where maturin is manually installed.
- Manually install maturin via
pip install maturin==0.14
maturin build --release --strip --manylinux off
This command auto detects the python interpreter and uses it. To specify a specific interpreter using--interpreter
option.maturin sdist
to generate the source distribution.
- Manually install maturin via
- Steps to generate bindings using a docker approach.
docker run --rm -v --release --strip --manylinux off
- After the bindings are generated by either 2 or 3 the next step is to publish the artifacts.
- The artifacts can be published via twine
pip install twine
twine upload -r testpypi target/*
this command uploads the artifacts to test.pypitwine upload target/*
this command uploads the artifacts to pypi.
- The artifacts can be published via maturin
maturin publish -b pyo3 -p XXX -u YYY -r https://test.pypi.org/legacy/
this publishes the bindings to test.pypimaturin publish -b pyo3 -p XXX -u YYY
This publishes the bindings to pypi.
- The artifacts can be published via twine