From 1676100dfd6fdfca7958bd052859b7abcb4e6e6c Mon Sep 17 00:00:00 2001 From: Adrien Date: Tue, 9 May 2023 14:43:30 +0200 Subject: [PATCH] Added a few lines to document the main difference between maturin and setuptools-rust as far as building manylinux-compliant wheels is concerned. Added newfragment --- guide/src/building_and_distribution.md | 2 +- guide/src/getting_started.md | 2 +- newsfragments/3146.added.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 newsfragments/3146.added.md diff --git a/guide/src/building_and_distribution.md b/guide/src/building_and_distribution.md index 8262204a..bd54a9f6 100644 --- a/guide/src/building_and_distribution.md +++ b/guide/src/building_and_distribution.md @@ -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. diff --git a/guide/src/getting_started.md b/guide/src/getting_started.md index 48d3626d..2dd45a43 100644 --- a/guide/src/getting_started.md +++ b/guide/src/getting_started.md @@ -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 diff --git a/newsfragments/3146.added.md b/newsfragments/3146.added.md new file mode 100644 index 00000000..3cb11a02 --- /dev/null +++ b/newsfragments/3146.added.md @@ -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. \ No newline at end of file