Skip to content

Commit 1d31c87

Browse files
authored
Merge pull request #196 from davidhewitt/fix-macos-cross-detection
macos: don't try to configure cross-compile
2 parents 2a462f9 + b730874 commit 1d31c87

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
### Fixed
55
- 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)
66
- Fix `--target` command line option being unable to take a value. [#195](https://github.com/PyO3/setuptools-rust/pull/195)
7+
- 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)
78

89
## 1.1.0 (2021-11-30)
910
### Added

setuptools_rust/build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,12 @@ def _detect_unix_cross_compile_info() -> Optional["_CrossCompileInfo"]:
589589
# not *NIX, or not cross compiling
590590
return None
591591

592+
if "apple-darwin" in host_type and (build_type and "apple-darwin" in build_type):
593+
# On macos and the build and host differ. This is probably an arm
594+
# Python which was built on x86_64. Don't try to handle this for now.
595+
# (See https://github.com/PyO3/setuptools-rust/issues/192)
596+
return None
597+
592598
stdlib = sysconfig.get_path("stdlib")
593599
assert stdlib is not None
594600
cross_lib = os.path.dirname(stdlib)

0 commit comments

Comments
 (0)