@@ -3,7 +3,9 @@ name: basemap-for-manylinux
33env :
44 PKGDIR : " packages/basemap"
55 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
79
810on :
911 push :
3638 strategy :
3739 matrix :
3840 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" ]
4042 max-parallel : 3
4143 fail-fast : false
4244 needs : checkout
@@ -128,7 +130,7 @@ jobs:
128130 arch :
129131 ["x64", "x86"]
130132 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" ]
132134 max-parallel : 3
133135 fail-fast : false
134136 needs : build-geos
@@ -158,18 +160,37 @@ jobs:
158160 case "${{ matrix.python-version }}" in
159161 2.6|3.[23]) pkgvers=1.11.3;;
160162 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;;
162165 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
164181 -
165182 name : Build wheel
166183 run : |
167184 sitepkgdir=$(pip show numpy 2>/dev/null | grep Location: | cut -d' ' -f2)
168185 export GEOS_DIR="${GITHUB_WORKSPACE}/${{ env.PKGDIR }}/extern"
169186 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
170191 cd ${{ env.PKGDIR }}
171192 python setup.py sdist
172- pip wheel -w dist --no-deps dist/*.zip
193+ pip wheel -w dist --no-deps ${kwds} dist/*.zip
173194 -
174195 name : Upload build artifacts
175196 uses : actions/upload-artifact@v1
@@ -183,7 +204,7 @@ jobs:
183204 arch :
184205 ["x64", "x86"]
185206 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" ]
187208 max-parallel : 3
188209 fail-fast : false
189210 needs : build
@@ -203,18 +224,11 @@ jobs:
203224 name : artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
204225 path : ${{ env.PKGDIR }}/dist
205226 -
206- name : Install unzip
227+ name : Install auditwheel
207228 run : |
208229 apt-get update
209230 apt-get install -y unzip
210- -
211- name : Install patchelf
212- run : |
213231 pip install patchelf
214- alias patchelf="python -m patchelf"
215- -
216- name : Install auditwheel
217- run : |
218232 pip install "auditwheel < 4.0"
219233 -
220234 name : Repair wheel
@@ -235,7 +249,7 @@ jobs:
235249 arch :
236250 ["x64", "x86"]
237251 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" ]
239253 max-parallel : 3
240254 fail-fast : false
241255 needs : repair
@@ -254,13 +268,6 @@ jobs:
254268 with :
255269 name : artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
256270 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'
264271 -
265272 name : Install numpy from source
266273 run : |
@@ -284,7 +291,7 @@ jobs:
284291 arch :
285292 ["x64", "x86"]
286293 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" ]
288295 max-parallel : 1
289296 if : startsWith(github.event.ref, 'refs/tags/v')
290297 needs : test
0 commit comments