Skip to content

Commit 3219c1d

Browse files
committed
docs: add short note on building for limited api
1 parent 494e445 commit 3219c1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/building_wheels.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Building wheels
22

3-
Because `setuptools_rust` is an extension to `setuptools`, the standard `setup.py bdist_wheel` command is used to build wheels which can be uploaded to pypy.
3+
Because `setuptools-rust` is an extension to `setuptools`, the standard `setup.py bdist_wheel` command is used to build distributable wheels. These wheels can be uploaded to PyPI using standard tools such as [twine](https://github.com/pypa/twine).
44

5-
This doc suggests two ways to go about this.
5+
`setuptools-rust` supports building for the [PEP 384](https://www.python.org/dev/peps/pep-0384/) "stable" (aka "limited") API when the `--py-limited-api` option is passed to `setup.py bdist_wheel`. If using PyO3 bindings for `RustExtension`, then the correct [`pyo3/abi3`](https://pyo3.rs/v0.14.5/features.html#abi3) sub-feature is automatically enabled. In this way, abi3 wheels can be uploaded to make package distributors' roles easier, and package users installing from source with `python setup.py install` can use optimizations specific to their Python version.
6+
7+
This chapter of the documentation explains two possible ways to build wheels for multiple Python versions below.
68

79
## Using `cibuildwheel`
810

@@ -47,8 +49,6 @@ hello_rust-0.1.0-cp38-cp38-linux_x86_64.whl hello_rust-0.1.0-cp38-cp38
4749
hello_rust-0.1.0-cp39-cp39-linux_x86_64.whl hello_rust-0.1.0-cp39-cp39-manylinux2014_x86_64.whl
4850
```
4951

50-
You can then upload the `manylinux2014` wheels to pypi using [twine](https://github.com/pypa/twine).
51-
5252
It is possible to use any of the `manylinux` docker images: `manylinux1`, `manylinux2010` or `manylinux2014`. (Just replace `manylinux2014` in the above instructions with the alternative version you wish to use.)
5353

5454
### Binary wheels on macOS

0 commit comments

Comments
 (0)