@@ -61,22 +61,22 @@ jobs:
6161 name : checkout
6262 path : .
6363 -
64- name : Set Python
65- uses : actions/setup-python@v2
66- with :
67- architecture : ${{ matrix.arch }}
68- python-version : " 3.6"
69- -
70- name : Setup MSVC toolset
64+ name : Set MSVC toolset
7165 uses : pylegacy/actions/setup-msvc@v1
7266 with :
7367 architecture : ${{ matrix.arch }}
7468 version : ${{ matrix.msvc-toolset }}
7569 -
76- name : Install CMake
70+ name : Set CMake
7771 uses : jwlawson/actions-setup-cmake@v1.9
7872 with :
7973 cmake-version : ${{ matrix.cmake-version }}
74+ -
75+ name : Set Python
76+ uses : actions/setup-python@v2
77+ with :
78+ architecture : ${{ matrix.arch }}
79+ python-version : " 3.6"
8080 -
8181 name : Build GEOS from source
8282 run : |
@@ -107,12 +107,6 @@ jobs:
107107 with :
108108 name : checkout
109109 path : .
110- -
111- name : Set Python
112- uses : actions/setup-python@v2
113- with :
114- architecture : ${{ matrix.arch }}
115- python-version : ${{ matrix.python-version }}
116110 -
117111 name : Set MSVC toolset version
118112 run : |
@@ -122,52 +116,45 @@ jobs:
122116 echo "msvc-toolset=14.16" >> $env:GITHUB_ENV
123117 }
124118 -
125- name : Setup MSVC toolset
119+ name : Set MSVC toolset
126120 uses : pylegacy/actions/setup-msvc@v1
127121 with :
128122 architecture : ${{ matrix.arch }}
129123 version : ${{ env.msvc-toolset }}
130124 -
131- name : Install Python base packages
125+ name : Set Python
126+ uses : actions/setup-python@v2
127+ with :
128+ architecture : ${{ matrix.arch }}
129+ python-version : ${{ matrix.python-version }}
130+ -
131+ name : Set Python base packages
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 }}
167- $env:GEOS_DIR = "extern"
168- $env:NUMPY_INCLUDE_PATH = "extern/include"
154+ $env:GEOS_DIR = "$env:GITHUB_WORKSPACE/${{ env.PKGDIR }}/extern"
169155 pip install -r requirements-setup.txt
170- python setup.py sdist bdist_wheel
156+ python setup.py sdist
157+ pip wheel -w dist --no-deps (Get-Item dist/*.zip)
171158 -
172159 name : Upload build artifacts
173160 uses : actions/upload-artifact@v1
@@ -187,12 +174,6 @@ jobs:
187174 needs : build
188175 runs-on : windows-latest
189176 steps :
190- -
191- name : Download checkout
192- uses : actions/download-artifact@v1
193- with :
194- name : checkout
195- path : .
196177 -
197178 name : Set Python
198179 uses : actions/setup-python@v2
0 commit comments