pyo3/guide/src/distribution.md
2017-06-27 21:09:16 +08:00

902 B

Distribution

setuptools-rust integration

setuptools-rust is a setuptools helpers for Rust Python extensions. It supports PyO3 by default.

For detailed usage, please refer to its README

Source distribution

To build a source code distribution, you need to add the following lines to your MANIFEST.in file to ensure it correctly packages Rust extension source code.

include Cargo.toml
recursive-include src *

Then you can build a source code distribution by (assuming you have already written a setup.py):

python setup.py sdist

Binary wheel distribution

To build a binary wheel, manylinux would be a natural choice for Linux.

TODO: an manylinux1 example, macOS wheel