Skip to content

Commit

Permalink
Merge pull request #114 from bwoodsend/universal2
Browse files Browse the repository at this point in the history
Compile in universal2 mode for macOS Python >= 3.9.1.
  • Loading branch information
Vladimir Safonkin authored Jun 2, 2022
2 parents c3505cc + 3c5fa6d commit 52b4d85
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions builders/macos-python-builder.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ class macOSPythonBuilder : NixPythonBuilder {
$configureString += " --enable-shared"
$configureString += " --with-lto"

### For Python versions which support it, compile a universal2 (arm64 + x86_64 hybrid) build. The arm64 slice
### will never be used itself by a Github Actions runner but using a universal2 Python is the only way to build
### universal2 C extensions and wheels. This is supported by Python >= 3.10 and was backported to Python >=
### 3.9.1 and >= 3.8.10.
if ($this.Version -ge "3.8.10" -and $this.Version -ne "3.9.0" ) {
$configureString += " --enable-universalsdk --with-universal-archs=universal2"
}

### OS X 10.11, Apple no longer provides header files for the deprecated system version of OpenSSL.
### Solution is to install these libraries from a third-party package manager,
### and then add the appropriate paths for the header and library files to configure command.
Expand Down

0 comments on commit 52b4d85

Please sign in to comment.