Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos: don't try to configure cross-compile #196

Merged
merged 1 commit into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
### Fixed
- Fix regression from `setuptools-rust` 1.1.0 which broke builds for the `x86_64-unknown-linux-musl` target. [#194](https://github.com/PyO3/setuptools-rust/pull/194)
- Fix `--target` command line option being unable to take a value. [#195](https://github.com/PyO3/setuptools-rust/pull/195)
- Fix regression from `setuptools-rust` 1.0.0 which broke builds on arm64 macos conda builds. [#196](https://github.com/PyO3/setuptools-rust/pull/196)

## 1.1.0 (2021-11-30)
### Added
Expand Down
6 changes: 6 additions & 0 deletions setuptools_rust/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,12 @@ def _detect_unix_cross_compile_info() -> Optional["_CrossCompileInfo"]:
# not *NIX, or not cross compiling
return None

if "apple-darwin" in host_type and (build_type and "apple-darwin" in build_type):
# On macos and the build and host differ. This is probably an arm
# Python which was built on x86_64. Don't try to handle this for now.
# (See https://github.com/PyO3/setuptools-rust/issues/192)
return None

stdlib = sysconfig.get_path("stdlib")
assert stdlib is not None
cross_lib = os.path.dirname(stdlib)
Expand Down