[ci] [python-package] run macOS x86_64 tests on macOS 12 (Monterey), stop manually setting macOS wheel tags #6487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #5328
Proposes some changes to macOS packaging:
scikit-build-core
automatically determine themNotes for Reviewers
Why drop Big Sur testing?
Azure DevOps is dropping support for macOS Big Sur (11.x). See these warnings at the top of all the recent Azure DevOps builds here:
(example build link)
According to https://endoflife.date/macos, Big Sur support ended in September 2023
List of supported Microsoft-hosted Azure DevOps images: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#use-a-microsoft-hosted-agent
Why let
scikit-build-core
choose the platform target?mv
This would result in supporting a wider range of macOS versions with
lightgbm
's wheels than the last release (v4.4.0) did. For example, in 4.4.40lightgbm
has this:ref: https://pypi.org/project/lightgbm/4.4.0/#files
As of this PR,
lightgbm
would support:CI logs:
How does automatic determination of the tag work?
scikit-build-core
determines the range of macOS versions by inspecting theMACOSX_DEPLOYMENT_TARGET
environment variable where available, and otherwise falling back toplatform.mac_ver()
.https://github.com/scikit-build/scikit-build-core/blob/acb7d0346e4a05bcb47a4ea3939c705ab71e3145/src/scikit_build_core/builder/macos.py#L36
Using this mechanism instead of manual renaming allows building wheels that target macOS versions older than whatever version the CI build is running on, to continue to support users on older systems. This is how
xgboost
, for example, is able to continue producing wheels that support macOS 10.X (Catalina).https://github.com/dmlc/xgboost/blob/6c83c8c2efdb522472c1d23349ab64320d455443/tests/ci_build/build_python_wheels.sh#L38
https://pypi.org/project/xgboost/2.0.3/#files
It should also be less error-prone than manually setting tags by renaming files.