diff --git a/README.md b/README.md index 7424f029..2e241961 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ What does it do? | CPython 3.5 | ✅ | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.6 | ✅ | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.7 | ✅ | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| CPython 3.8 | ✅ | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | PyPy 2.7 v7.3.3 | ✅ | | | ✅ | ✅ | | | | | | PyPy 3.6 v7.3.3 | ✅ | | | ✅ | ✅ | | | | | @@ -48,7 +48,7 @@ Usage | | Linux | macOS | Windows | Linux ARM | |-----------------|-------|-------|---------|--------------| -| GitHub Actions | ✅ | ✅ | ✅ | ✅¹ | +| GitHub Actions | ✅ | ✅ | ✅ | ✅¹ | | Azure Pipelines | ✅ | ✅ | ✅ | | | Travis CI | ✅ | ✅ | ✅ | ✅ | | AppVeyor | ✅ | ✅ | ✅ | | diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 25d87115..7d04d4e8 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -293,22 +293,20 @@ def setup_python( # https://github.com/python/cpython/blob/a5ed2fe0eedefa1649aa93ee74a0bafc8e628a10/Lib/_osx_support.py#L260 env.setdefault("ARCHFLAGS", "-arch x86_64") - if python_configuration.version == "3.9": - if python_configuration.identifier.endswith("x86_64"): - # even on the macos11.0 Python installer, on the x86_64 side it's - # compatible back to 10.9. - env.setdefault("_PYTHON_HOST_PLATFORM", "macosx-10.9-x86_64") - env.setdefault("ARCHFLAGS", "-arch x86_64") - elif config_is_arm64: + elif python_configuration.version not in {"3.6", "3.7"}: + if config_is_arm64: # macOS 11 is the first OS with arm64 support, so the wheels # have that as a minimum. env.setdefault("_PYTHON_HOST_PLATFORM", "macosx-11.0-arm64") env.setdefault("ARCHFLAGS", "-arch arm64") elif config_is_universal2: - if get_macos_version() < (10, 16): - # we can do universal2 builds on macos 10.15, but we need to - # set ARCHFLAGS otherwise CPython sets it to `-arch x86_64` - env.setdefault("ARCHFLAGS", "-arch arm64 -arch x86_64") + env.setdefault("_PYTHON_HOST_PLATFORM", "macosx-10.9-universal2") + env.setdefault("ARCHFLAGS", "-arch arm64 -arch x86_64") + elif python_configuration.identifier.endswith("x86_64"): + # even on the macos11.0 Python installer, on the x86_64 side it's + # compatible back to 10.9. + env.setdefault("_PYTHON_HOST_PLATFORM", "macosx-10.9-x86_64") + env.setdefault("ARCHFLAGS", "-arch x86_64") building_arm64 = config_is_arm64 or config_is_universal2 if building_arm64 and get_macos_version() < (10, 16) and "SDKROOT" not in env: diff --git a/cibuildwheel/resources/build-platforms.toml b/cibuildwheel/resources/build-platforms.toml index 30941c0a..8047c271 100644 --- a/cibuildwheel/resources/build-platforms.toml +++ b/cibuildwheel/resources/build-platforms.toml @@ -40,10 +40,12 @@ python_configurations = [ { identifier = "cp35-macosx_x86_64", version = "3.5", url = "https://www.python.org/ftp/python/3.5.4/python-3.5.4-macosx10.6.pkg" }, { identifier = "cp36-macosx_x86_64", version = "3.6", url = "https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.9.pkg" }, { identifier = "cp37-macosx_x86_64", version = "3.7", url = "https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg" }, - { identifier = "cp38-macosx_x86_64", version = "3.8", url = "https://www.python.org/ftp/python/3.8.9/python-3.8.9-macosx10.9.pkg" }, - { identifier = "cp39-macosx_x86_64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.4/python-3.9.4-macos11.pkg" }, - { identifier = "cp39-macosx_arm64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.4/python-3.9.4-macos11.pkg" }, - { identifier = "cp39-macosx_universal2", version = "3.9", url = "https://www.python.org/ftp/python/3.9.4/python-3.9.4-macos11.pkg" }, + { identifier = "cp38-macosx_x86_64", version = "3.8", url = "https://www.python.org/ftp/python/3.8.10/python-3.8.10-macosx10.9.pkg" }, + { identifier = "cp38-macosx_arm64", version = "3.8", url = "https://www.python.org/ftp/python/3.8.10/python-3.8.10-macosx10.9.pkg" }, + { identifier = "cp38-macosx_universal2", version = "3.8", url = "https://www.python.org/ftp/python/3.8.10/python-3.8.10-macosx10.9.pkg" }, + { identifier = "cp39-macosx_x86_64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.5/python-3.9.5-macos11.pkg" }, + { identifier = "cp39-macosx_arm64", version = "3.9", url = "https://www.python.org/ftp/python/3.9.5/python-3.9.5-macos11.pkg" }, + { identifier = "cp39-macosx_universal2", version = "3.9", url = "https://www.python.org/ftp/python/3.9.5/python-3.9.5-macos11.pkg" }, { identifier = "pp27-macosx_x86_64", version = "2.7", url = "https://downloads.python.org/pypy/pypy2.7-v7.3.3-osx64.tar.bz2" }, { identifier = "pp36-macosx_x86_64", version = "3.6", url = "https://downloads.python.org/pypy/pypy3.6-v7.3.3-osx64.tar.bz2" }, { identifier = "pp37-macosx_x86_64", version = "3.7", url = "https://downloads.python.org/pypy/pypy3.7-v7.3.3-osx64.tar.bz2" },