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 producing wheel for 10.9 even though 11.0 is specified #952

Closed
tonybaloney opened this issue Dec 8, 2021 · 7 comments
Closed

MacOS producing wheel for 10.9 even though 11.0 is specified #952

tonybaloney opened this issue Dec 8, 2021 · 7 comments

Comments

@tonybaloney
Copy link
Contributor

Description

I'm trying to produce universal2, x64 and arm64 wheels for macOS 11+.

The extension module specifically requires 11.0+ and would fail in older versions of Mac.

I've tried setting MACOSX_DEPLOYMENT_TARGET=11.0 after looking at the source code. There's nothing in the documentation how to change the deployment target for the wheels to be 11.0 instead of 10.9

In spite of this, CI produces the file -

pyjion-1.2.0-cp310-cp310-macosx_10_9_universal2.whl

The build workflow is -

name: Build

on: [push, pull_request]

jobs:
  build_wheels:
    name: Build wheels on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest]

    steps:
      - uses: actions/checkout@v2
        with:
          submodules: 'recursive'

      - name: Build wheels
        uses: pypa/[email protected]
        env:
          CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
          CIBW_BEFORE_BUILD_MACOS: "bash eng/install-dotnet.sh --version 6.0.100"
          CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0

      - uses: actions/upload-artifact@v2
        with:
          path: ./wheelhouse/*.whl

pyproject.toml

[build-system]
requires = ["setuptools", "wheel", "scikit-build", "cmake", "ninja"]

[tool.cibuildwheel.macos]
before-build = "bash eng/install-dotnet.sh --version 6.0.100"
environment = {MACOSX_DEPLOYMENT_TARGET=11.0}
repair-wheel-command = ""
archs = ["x86_64", "universal2"]

Build log

No response

CI config

No response

@joerick
Copy link
Contributor

joerick commented Dec 8, 2021

I'm no expert, but if your build is using cmake, you might have better luck with CMAKE_OSX_DEPLOYMENT_TARGET. Can't find a relevant discussion on this but I'm sure it has come up previously....! @henryiii might have more ideas from the scikit-build side.

@henryiii
Copy link
Contributor

henryiii commented Dec 8, 2021

I bet this is a reverse manifestation of scikit-build/scikit-build#596 & #818, which might be fixed by scikit-build/scikit-build#607

@tonybaloney
Copy link
Contributor Author

@henryiii I raised it here because if I do setup.py bdist_wheel it creates the 11.0 version

@henryiii
Copy link
Contributor

henryiii commented Dec 9, 2021

cibuildwheel sets _PYTHON_HOST_PLATFORM to something containing 10.9 regardless of MACOSX_DEPLOYMENT_TARGET (see #819), however this was considered scikit-build's fault for blindly accepting this since setuptoools still computes the macOS version even if it's wrong here.

@henryiii
Copy link
Contributor

henryiii commented Dec 9, 2021

Could you see if using scikit-build/scikit-build#607 fixes it?

@joerick
Copy link
Contributor

joerick commented Mar 21, 2022

Closed due to inactivity. Feel free to reopen if you have more info.

@joerick joerick closed this as completed Mar 21, 2022
@henryiii
Copy link
Contributor

Yeah, this should have been fixed in a released version of Scikit-build.

edgarsi pushed a commit to edgarsi/strstrdict that referenced this issue Nov 23, 2022
Wheels for MacOS can't be created. Regardless of the target MacOS version, the
wheels get built by 10.9. Might be related to:
pypa/cibuildwheel#952
edgarsi pushed a commit to edgarsi/strstrdict that referenced this issue Nov 23, 2022
Wheels for MacOS can't be created. Regardless of the target MacOS version, the
wheels get built by 10.9. Might be related to:
pypa/cibuildwheel#952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants