3146: Added a few lines to document the main difference between maturin and… r=adamreichold a=why-not-try-calmer

… setuptools-rust as far as building manylinux-compliant wheels is concerned.

Co-authored-by: Adrien <mrnycticorax@gmail.com>
This commit is contained in:
bors[bot] 2023-05-09 12:55:25 +00:00 committed by GitHub
commit 23e764d1ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -71,7 +71,7 @@ The PyO3 ecosystem has two main choices to abstract the process of developing Py
- [`maturin`] is a command-line tool to build, package and upload Python modules. It makes opinionated choices about project layout meaning it needs very little configuration. This makes it a great choice for users who are building a Python extension from scratch and don't need flexibility.
- [`setuptools-rust`] is an add-on for `setuptools` which adds extra keyword arguments to the `setup.py` configuration file. It requires more configuration than `maturin`, however this gives additional flexibility for users adding Rust to an existing Python package that can't satisfy `maturin`'s constraints.
Consult each project's documentation for full details on how to get started using them and how to upload wheels to PyPI.
Consult each project's documentation for full details on how to get started using them and how to upload wheels to PyPI. It should be noted that while `maturin` is able to build [manylinux](https://github.com/pypa/manylinux)-compliant wheels out-of-the-box, `setuptools-rust` requires a bit more effort, [relying on Docker](https://setuptools-rust.readthedocs.io/en/latest/building_wheels.html) for this purpose.
There are also [`maturin-starter`] and [`setuptools-rust-starter`] examples in the PyO3 repository.

View File

@ -23,7 +23,7 @@ PYTHON_CONFIGURE_OPTS="--enable-shared"
### Building
There are a number of build and Python package management systems such as [`setuptools-rust`](https://github.com/PyO3/setuptools-rust) or [manually](https://pyo3.rs/latest/building_and_distribution.html#manual-builds). We recommend the use of `maturin`, which you can install [here](https://maturin.rs/installation.html). It is developed to work with PyO3 and provides the most "batteries included" experience. `maturin` is just a Python package, so you can add it in the same you already install Python packages.
There are a number of build and Python package management systems such as [`setuptools-rust`](https://github.com/PyO3/setuptools-rust) or [manually](https://pyo3.rs/latest/building_and_distribution.html#manual-builds). We recommend the use of `maturin`, which you can install [here](https://maturin.rs/installation.html). It is developed to work with PyO3 and provides the most "batteries included" experience, especially if you are aiming to publish to PyPI. `maturin` is just a Python package, so you can add it in the same you already install Python packages.
System Python:
```bash

View File

@ -0,0 +1 @@
Added a few lines to document the main difference between maturin and setuptools-rust as far as building manylinux-compliant wheels is concerned.