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