@@ -132,41 +132,26 @@ jobs:
132
132
run : |
133
133
python -m pip install --upgrade pip setuptools wheel
134
134
-
135
- name : Generate NumPy headers
135
+ name : Build old numpy from source
136
136
run : |
137
- if ("${{ matrix.python-version }}" -In "2.6", "3.2", "3.3") {
138
- Set-Variable -Name "pkgvers" -Value "1.11.3"
139
- } elseif ("${{ matrix.python-version }}" -In "2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9") {
140
- Set-Variable -Name "pkgvers" -Value "1.16.6"
141
- } else {
142
- Set-Variable -Name "pkgvers" -Value "1.21.4"
137
+ Switch -regex ("${{ matrix.python-version }}") {
138
+ "^2\.6|3\.[123]$" { Set-Variable -Name "pkgvers" -Value "1.11.3" }
139
+ "^2\.7|3\.[456789]$" { Set-Variable -Name "pkgvers" -Value "1.16.6" }
140
+ default { Set-Variable -Name "pkgvers" -Value "1.21.4" }
143
141
}
144
- Set-Variable -Name "pkgname" -Value "numpy"
145
- Set-Variable -Name "pkgcode" -Value "numpy-${pkgvers}"
146
- Set-Variable -Name "includedir" -Value "numpy/core/include"
147
- python -m pip install cython
148
- python -m pip download --no-binary=numpy "numpy == ${pkgvers}"
149
- tar -xf "${pkgcode}.zip"
150
- rm "${pkgcode}.zip"
151
- cd "${pkgcode}"
152
- python setup.py build
153
- cp -R build/src.*/${includedir}/numpy/*.h ${includedir}/numpy
154
- cd ..
155
- cp -R "${pkgcode}/${includedir}/numpy" "${{ env.PKGDIR }}/extern/include/numpy"
156
- rm -r "${pkgcode}"
142
+ $env:SETUPTOOLS_USE_DISTUTILS = "stdlib"
143
+ python -m pip install "numpy == ${pkgvers}"
157
144
-
158
145
name : Download GEOS artifacts
159
146
uses : actions/download-artifact@v1
160
147
with :
161
148
name : artifacts-geos-${{ matrix.arch }}-msvc${{ env.msvc-toolset }}
162
149
path : ${{ env.PKGDIR }}/extern
163
150
-
164
- name : Build wheel
151
+ name : Build sdist and wheel
165
152
run : |
166
153
cd ${{ env.PKGDIR }}
167
154
$env:GEOS_DIR = "$env:GITHUB_WORKSPACE/${{ env.PKGDIR }}/extern"
168
- $env:NUMPY_INCLUDE_PATH = "$env:GITHUB_WORKSPACE/${{ env.PKGDIR }}/extern/include"
169
- $env:SETUPTOOLS_USE_DISTUTILS = "stdlib"
170
155
pip install -r requirements-setup.txt
171
156
python setup.py sdist
172
157
pip wheel -w dist --no-deps (Get-Item dist/*.zip)
0 commit comments