Skip to content

Commit 9dbf690

Browse files
authored
Merge pull request #122 from davidhewitt/universal2-wheels-docs
docs: mention universal2 / ARCHFLAGS
2 parents 26eff9f + 83e4a4f commit 9dbf690

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![readthedocs](https://readthedocs.org/projects/pip/badge/)](https://setuptools-rust.readthedocs.io/en/latest/)
66
[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
77

8-
Setuptools helpers for Rust Python extensions implemented with [PyO3](https://github.com/PyO3/pyo3) and [rust-cpython](https://github.com/dgrunwald/rust-cpython).
8+
`setuptools-rust` is a plugin for `setuptools` to build Rust Python extensions implemented with [PyO3](https://github.com/PyO3/pyo3) and [rust-cpython](https://github.com/dgrunwald/rust-cpython).
99

1010
Compile and distribute Python extensions written in Rust as easily as if
1111
they were written in C.
@@ -133,6 +133,12 @@ You can then upload the `manylinux2014` wheels to pypi using [twine](https://git
133133

134134
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.)
135135

136+
### Binary wheels on macOS
137+
138+
For building wheels on macOS it is sufficient to run the `bdist_wheel` command, i.e. `setup.py bdist_wheel`.
139+
140+
To build `universal2` wheels set the `ARCHFLAGS` environment variable to contain both `x86_64` and `arm64`, for example `ARCHFLAGS="-arch x86_64 -arch arm64"`. Wheel-building solutions such as [`cibuildwheel`](https://github.com/joerick/cibuildwheel) set this environment variable automatically.
141+
136142
## Commands
137143

138144
- build - Standard build command builds all rust extensions.

0 commit comments

Comments
 (0)