36
36
strategy :
37
37
matrix :
38
38
python-version :
39
- ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
39
+ ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ]
40
40
max-parallel : 3
41
41
fail-fast : false
42
42
needs : checkout
@@ -128,7 +128,7 @@ jobs:
128
128
arch :
129
129
["x64", "x86"]
130
130
python-version :
131
- ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
131
+ ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ]
132
132
max-parallel : 3
133
133
fail-fast : false
134
134
needs : build-geos
@@ -158,18 +158,37 @@ jobs:
158
158
case "${{ matrix.python-version }}" in
159
159
2.6|3.[23]) pkgvers=1.11.3;;
160
160
2.7|3.[456789]) pkgvers=1.16.6;;
161
- *) pkgvers=1.21.4;;
161
+ 3.10) pkgvers=1.21.4;;
162
+ *) pkgvers=1.23.3;;
162
163
esac
163
- pip install "numpy == ${pkgvers}"
164
+ # Dirty solution to get NumPy headers for Python 3.11.
165
+ if [ "${{ matrix.python-version }}" = "3.11" ]; then
166
+ case "${{ matrix.arch }}" in
167
+ x64) kwds="--plat=manylinux_2_17_x86_64" ;;
168
+ x86) kwds="--plat=manylinux_2_17_i686" ;;
169
+ esac
170
+ pip download --no-deps ${kwds} "numpy==${pkgvers}"
171
+ oldpkgfile=$(ls *.whl | head -n1)
172
+ newpkgfile=$(echo "${oldpkgfile}" | sed 's/manylinux_2_17/linux/')
173
+ mv "${oldpkgfile}" "${newpkgfile}"
174
+ pip install "${newpkgfile}"
175
+ rm "${newpkgfile}"
176
+ else
177
+ pip install "numpy == ${pkgvers}"
178
+ fi
164
179
-
165
180
name : Build wheel
166
181
run : |
167
182
sitepkgdir=$(pip show numpy 2>/dev/null | grep Location: | cut -d' ' -f2)
168
183
export GEOS_DIR="${GITHUB_WORKSPACE}/${{ env.PKGDIR }}/extern"
169
184
export NUMPY_INCLUDE_PATH=${sitepkgdir}/numpy/core/include
185
+ if [ "${{ matrix.python-version }}" = "3.11" ]; then
186
+ kwds="--no-build-isolation"
187
+ pip install setuptools wheel "cython >= 0.29, < 3.1"
188
+ fi
170
189
cd ${{ env.PKGDIR }}
171
190
python setup.py sdist
172
- pip wheel -w dist --no-deps dist/*.zip
191
+ pip wheel -w dist --no-deps ${kwds} dist/*.zip
173
192
-
174
193
name : Upload build artifacts
175
194
uses : actions/upload-artifact@v1
@@ -183,7 +202,7 @@ jobs:
183
202
arch :
184
203
["x64", "x86"]
185
204
python-version :
186
- ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
205
+ ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ]
187
206
max-parallel : 3
188
207
fail-fast : false
189
208
needs : build
@@ -203,18 +222,11 @@ jobs:
203
222
name : artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
204
223
path : ${{ env.PKGDIR }}/dist
205
224
-
206
- name : Install unzip
225
+ name : Install auditwheel
207
226
run : |
208
227
apt-get update
209
228
apt-get install -y unzip
210
- -
211
- name : Install patchelf
212
- run : |
213
229
pip install patchelf
214
- alias patchelf="python -m patchelf"
215
- -
216
- name : Install auditwheel
217
- run : |
218
230
pip install "auditwheel < 4.0"
219
231
-
220
232
name : Repair wheel
@@ -235,7 +247,7 @@ jobs:
235
247
arch :
236
248
["x64", "x86"]
237
249
python-version :
238
- ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
250
+ ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ]
239
251
max-parallel : 3
240
252
fail-fast : false
241
253
needs : repair
@@ -254,13 +266,6 @@ jobs:
254
266
with :
255
267
name : artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
256
268
path : ${{ env.PKGDIR }}/dist
257
- -
258
- name : Install matplotlib dependencies
259
- run : |
260
- apt-get update
261
- apt-get install -y gcc g++ make
262
- apt-get install -y pkg-config libfreetype6-dev libpng12-dev
263
- if : matrix.arch == 'x86' && matrix.python-version == '3.5'
264
269
-
265
270
name : Install numpy from source
266
271
run : |
@@ -284,7 +289,7 @@ jobs:
284
289
arch :
285
290
["x64", "x86"]
286
291
python-version :
287
- ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
292
+ ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ]
288
293
max-parallel : 1
289
294
if : startsWith(github.event.ref, 'refs/tags/v')
290
295
needs : test
0 commit comments