@@ -61,22 +61,22 @@ jobs:
61
61
name : checkout
62
62
path : .
63
63
-
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
71
65
uses : pylegacy/actions/setup-msvc@v1
72
66
with :
73
67
architecture : ${{ matrix.arch }}
74
68
version : ${{ matrix.msvc-toolset }}
75
69
-
76
- name : Install CMake
70
+ name : Set CMake
77
71
78
72
with :
79
73
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"
80
80
-
81
81
name : Build GEOS from source
82
82
run : |
@@ -107,12 +107,6 @@ jobs:
107
107
with :
108
108
name : checkout
109
109
path : .
110
- -
111
- name : Set Python
112
- uses : actions/setup-python@v2
113
- with :
114
- architecture : ${{ matrix.arch }}
115
- python-version : ${{ matrix.python-version }}
116
110
-
117
111
name : Set MSVC toolset version
118
112
run : |
@@ -122,52 +116,45 @@ jobs:
122
116
echo "msvc-toolset=14.16" >> $env:GITHUB_ENV
123
117
}
124
118
-
125
- name : Setup MSVC toolset
119
+ name : Set MSVC toolset
126
120
uses : pylegacy/actions/setup-msvc@v1
127
121
with :
128
122
architecture : ${{ matrix.arch }}
129
123
version : ${{ env.msvc-toolset }}
130
124
-
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
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
- $env:GEOS_DIR = "extern"
168
- $env:NUMPY_INCLUDE_PATH = "extern/include"
154
+ $env:GEOS_DIR = "$env:GITHUB_WORKSPACE/${{ env.PKGDIR }}/extern"
169
155
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)
171
158
-
172
159
name : Upload build artifacts
173
160
uses : actions/upload-artifact@v1
@@ -187,12 +174,6 @@ jobs:
187
174
needs : build
188
175
runs-on : windows-latest
189
176
steps :
190
- -
191
- name : Download checkout
192
- uses : actions/download-artifact@v1
193
- with :
194
- name : checkout
195
- path : .
196
177
-
197
178
name : Set Python
198
179
uses : actions/setup-python@v2
0 commit comments