@@ -132,41 +132,26 @@ jobs:
132132 run : |
133133 python -m pip install --upgrade pip setuptools wheel
134134 -
135- name : Generate NumPy headers
135+ name : Build old numpy from source
136136 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" }
143141 }
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}"
157144 -
158145 name : Download GEOS artifacts
159146 uses : actions/download-artifact@v1
160147 with :
161148 name : artifacts-geos-${{ matrix.arch }}-msvc${{ env.msvc-toolset }}
162149 path : ${{ env.PKGDIR }}/extern
163150 -
164- name : Build wheel
151+ name : Build sdist and wheel
165152 run : |
166153 cd ${{ env.PKGDIR }}
167154 $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"
170155 pip install -r requirements-setup.txt
171156 python setup.py sdist
172157 pip wheel -w dist --no-deps (Get-Item dist/*.zip)
0 commit comments