@@ -90,35 +90,21 @@ jobs:
90
90
name : Build wheels on ${{ matrix.os }} for ${{ matrix.cibw_archs }}
91
91
runs-on : ${{ matrix.os }}
92
92
env :
93
- # The following commands branch based on whether we are on the main
94
- # branch or have a PR into main. For these, we use the NumPy 2.0
95
- # nightlies to ensure future C-API/ABI compatibility.
96
- # This branching becomes unnecessary when NumPy 2.0 is released.
97
- # When using no-build-isolation we need to install all requirements.
98
- CIBW_BEFORE_BUILD :
99
- ${{ (((github.event_name == 'push' && github.ref == 'refs/heads/main') ||
100
- (github.event_name == 'pull_request' && github.base_ref == 'refs/heads/main')) &&
101
- ' pip install meson-python pybind11 setuptools_scm "setuptools>=64" ninja &&
102
- pip install "numpy>=2.0.0.dev0" --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" &&
103
- rm -rf {package}/build'
104
- ) ||
105
- ' pip install "numpy>=1.25" &&
106
- rm -rf {package}/build'
107
- }}
108
- CIBW_BEFORE_BUILD_WINDOWS :
109
- ${{ (((github.event_name == 'push' && github.ref == 'refs/heads/main') ||
110
- (github.event_name == 'pull_request' && github.base_ref == 'refs/heads/main')) &&
111
- ' pip install delvewheel meson-python pybind11 setuptools_scm "setuptools>=64" ninja &&
112
- pip install "numpy>=2.0.0.dev0" --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" &&
113
- rm -rf {package}/build'
114
- ) ||
115
- ' pip install delvewheel "numpy>=1.25" &&
116
- rm -rf {package}/build'
117
- }}
93
+ CIBW_BEFORE_BUILD : >-
94
+ rm -rf {package}/build
95
+ CIBW_BEFORE_BUILD_WINDOWS : >-
96
+ pip install delvewheel &&
97
+ 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.
118
103
CIBW_BUILD_FRONTEND : >-
119
- ${{ (((github.event_name == 'push ' && github.ref == 'refs/heads/main') ||
104
+ ${{ (((github.event_name == 'main ' && github.ref == 'refs/heads/main') ||
120
105
(github.event_name == 'pull_request' && github.base_ref == 'refs/heads/main')) &&
121
- 'pip; args: --no-build-isolation') || 'build' }}
106
+ 'pip; args: --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"') ||
107
+ 'build' }}
122
108
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS : >-
123
109
delvewheel repair -w {dest_dir} {wheel}
124
110
CIBW_AFTER_BUILD : >-
0 commit comments