Skip to content

Commit e5c6c7c

Browse files
authored
Merge pull request matplotlib#27204 from seberg/build-numpy2
BLD: Use NumPy nightly wheels for non-release builds
2 parents 7296abf + b0509d9 commit e5c6c7c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,20 @@ jobs:
9191
runs-on: ${{ matrix.os }}
9292
env:
9393
CIBW_BEFORE_BUILD: >-
94-
pip install numpy>=1.25 &&
9594
rm -rf {package}/build
9695
CIBW_BEFORE_BUILD_WINDOWS: >-
97-
pip install delvewheel numpy>=1.25 &&
96+
pip install delvewheel &&
9897
rm -rf {package}/build
98+
# Live on the edge when building on main or a PR against main since
99+
# these wheels are also used for nightlies and NumPy 2.0 transition
100+
# requires using the NumPy 2.0 nightlies for compatibility.
101+
# If using all `--pre` releases creates issues, the NumPy wheel can be
102+
# istalled more targeted.
103+
CIBW_BUILD_FRONTEND: >-
104+
${{ (((github.event_name == 'push' && github.ref == 'refs/heads/main') ||
105+
(github.event_name == 'pull_request' && github.base_ref == 'main')) &&
106+
'pip; args: --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"') ||
107+
'build' }}
99108
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
100109
delvewheel repair -w {dest_dir} {wheel}
101110
CIBW_AFTER_BUILD: >-

0 commit comments

Comments
 (0)