-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enable building x86_64, arm64 and universal2 wheels on supported macOS Python versions #173
Conversation
The first cut still failed during I have added a new flag to specify additional packages to install during the |
I have now added building x86_64 and arm64 wheels on macOS with Python versions >= 3.8. Python 3.8 is the first version that supports Apple's M-class chips. arm64 wheels cannot be tested on the GHA runners. So only the x86_64 wheel gets the default name |
The first test run of this new configuration is with the BTrees package, see https://github.com/zopefoundation/BTrees/actions/runs/3450155539. |
I will merge this tomorrow morning if there's no feedback. I'm traveling later this week and would like to get this done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for putting so much effort into this issue.
|| startsWith(matrix.python-version, '3.11')) | ||
&& !(startsWith(matrix.python-version, 'pypy') | ||
|| matrix.python-version == '2.7' | ||
|| matrix.python-version == '3.5' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks okay as this list will shrink when we stop supporting Python < 3.6. (Maybe we could even think about dropping Python 3.6 support.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to make sure it's a list that doesn't need growing as new Python versions are releases. I'm still unhappy that there's apparently no way to safely express something like matrix.python-version < '3.8'
, something that understands versioning.
- name: Install %(package_name)s and dependencies (%(future_python_version)s) | ||
if: matrix.python-version == '%(future_python_version)s' | ||
run: | | ||
# Install to collect dependencies into the (pip) cache. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the comment could contain a hint about the --pre
flag.
We added it to build AccessControl against Python 3.11beta-X because a dev version of RestrictedPython was needed as its released version was not even installable on Python 3.11.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, comment added.
I think anything is better than the current situation where we have a mix of packages that either contain copies of header files from other packages (which may drift apart) or that use convoluted code to install requirements and then locate the path to the header files inside the packages. But that's for another day... |
This change applies the same environment flags used by cibuildwheel. Specifically, version 10.9 is explicitly selected when building x86_64 (and universal2) wheels. Only arm64 wheels select version 11.0. See here for details:
https://github.com/pypa/cibuildwheel/blob/2e6cbe2435ef410156319c98625002ed76e08785/cibuildwheel/macos.py#L217-L232
I have tried it on AccessControl master and the wheels get built just fine, see https://github.com/zopefoundation/AccessControl/actions/runs/3445282682/jobs/5748817908
You don't happen to know how to get the equivalent of "python version > 3.10" into a GHA expression, do you? That list of specific versions as condition irks me.