3636 strategy :
3737 matrix :
3838 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" ]
4040 max-parallel : 3
4141 fail-fast : false
4242 needs : checkout
@@ -128,7 +128,7 @@ jobs:
128128 arch :
129129 ["x64", "x86"]
130130 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" ]
132132 max-parallel : 3
133133 fail-fast : false
134134 needs : build-geos
@@ -158,18 +158,37 @@ jobs:
158158 case "${{ matrix.python-version }}" in
159159 2.6|3.[23]) pkgvers=1.11.3;;
160160 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;;
162163 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
164179 -
165180 name : Build wheel
166181 run : |
167182 sitepkgdir=$(pip show numpy 2>/dev/null | grep Location: | cut -d' ' -f2)
168183 export GEOS_DIR="${GITHUB_WORKSPACE}/${{ env.PKGDIR }}/extern"
169184 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
170189 cd ${{ env.PKGDIR }}
171190 python setup.py sdist
172- pip wheel -w dist --no-deps dist/*.zip
191+ pip wheel -w dist --no-deps ${kwds} dist/*.zip
173192 -
174193 name : Upload build artifacts
175194 uses : actions/upload-artifact@v1
@@ -183,7 +202,7 @@ jobs:
183202 arch :
184203 ["x64", "x86"]
185204 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" ]
187206 max-parallel : 3
188207 fail-fast : false
189208 needs : build
@@ -203,18 +222,11 @@ jobs:
203222 name : artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
204223 path : ${{ env.PKGDIR }}/dist
205224 -
206- name : Install unzip
225+ name : Install auditwheel
207226 run : |
208227 apt-get update
209228 apt-get install -y unzip
210- -
211- name : Install patchelf
212- run : |
213229 pip install patchelf
214- alias patchelf="python -m patchelf"
215- -
216- name : Install auditwheel
217- run : |
218230 pip install "auditwheel < 4.0"
219231 -
220232 name : Repair wheel
@@ -235,7 +247,7 @@ jobs:
235247 arch :
236248 ["x64", "x86"]
237249 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" ]
239251 max-parallel : 3
240252 fail-fast : false
241253 needs : repair
@@ -254,13 +266,6 @@ jobs:
254266 with :
255267 name : artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
256268 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'
264269 -
265270 name : Install numpy from source
266271 run : |
@@ -284,7 +289,7 @@ jobs:
284289 arch :
285290 ["x64", "x86"]
286291 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" ]
288293 max-parallel : 1
289294 if : startsWith(github.event.ref, 'refs/tags/v')
290295 needs : test
0 commit comments