3939 strategy :
4040 matrix :
4141 python-version :
42- ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
42+ ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
4343 max-parallel : 3
4444 fail-fast : false
4545 needs : checkout
@@ -131,7 +131,7 @@ jobs:
131131 arch :
132132 ["x64", "x86"]
133133 python-version :
134- ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
134+ ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
135135 max-parallel : 3
136136 fail-fast : false
137137 needs : build-geos
@@ -158,37 +158,44 @@ jobs:
158158 -
159159 name : Build old numpy from source
160160 run : |
161+ case "${{ matrix.arch }}" in
162+ x64) arch="x86_64" ;;
163+ x86) arch="i686" ;;
164+ esac
161165 case "${{ matrix.python-version }}" in
162- 2.6|3.[23]) pkgvers=1.11.3;;
163- 2.7|3.[456789]) pkgvers=1.16.6;;
164- 3.10) pkgvers=1.21.4;;
165- *) pkgvers=1.23.3;;
166+ 2.6|3.[23]) pkgvers=1.11.3; tag=manylinux1 ;;
167+ 2.7|3.[456789]) pkgvers=1.16.6; tag=manylinux1 ;;
168+ 3.10) pkgvers=1.21.4; tag=manylinux1 ;;
169+ 3.11) pkgvers=1.23.3; tag=manylinux_2_17 ;;
170+ *) pkgvers=1.26.1; tag=manylinux_2_28 ;;
171+ esac
172+ case "${{ matrix.python-version }}" in
173+ 3.11|3.12)
174+ # Dirty solution to get NumPy headers for Python 3.11 and 3.12.
175+ kwds="--plat=${tag}_${arch}"
176+ pip download --no-deps ${kwds} "numpy==${pkgvers}"
177+ oldpkgfile=$(ls *.whl | head -n1)
178+ newpkgfile=$(echo "${oldpkgfile}" | sed "s/${tag}/linux/")
179+ mv "${oldpkgfile}" "${newpkgfile}"
180+ pip install "${newpkgfile}"
181+ rm "${newpkgfile}"
182+ ;;
183+ *)
184+ pip install "numpy == ${pkgvers}"
185+ ;;
166186 esac
167- # Dirty solution to get NumPy headers for Python 3.11.
168- if [ "${{ matrix.python-version }}" = "3.11" ]; then
169- case "${{ matrix.arch }}" in
170- x64) kwds="--plat=manylinux_2_17_x86_64" ;;
171- x86) kwds="--plat=manylinux_2_17_i686" ;;
172- esac
173- pip download --no-deps ${kwds} "numpy==${pkgvers}"
174- oldpkgfile=$(ls *.whl | head -n1)
175- newpkgfile=$(echo "${oldpkgfile}" | sed 's/manylinux_2_17/linux/')
176- mv "${oldpkgfile}" "${newpkgfile}"
177- pip install "${newpkgfile}"
178- rm "${newpkgfile}"
179- else
180- pip install "numpy == ${pkgvers}"
181- fi
182187 -
183188 name : Build wheel
184189 run : |
185190 sitepkgdir=$(pip show numpy 2>/dev/null | grep Location: | cut -d' ' -f2)
186191 export GEOS_DIR="${GITHUB_WORKSPACE}/${{ env.PKGDIR }}/extern"
187192 export NUMPY_INCLUDE_PATH=${sitepkgdir}/numpy/core/include
188- if [ "${{ matrix.python-version }}" = "3.11" ]; then
189- kwds="--no-build-isolation"
190- pip install setuptools wheel "cython >= 0.29, < 3.1"
191- fi
193+ case "${{ matrix.python-version }}" in
194+ 3.11|3.12)
195+ kwds="--no-build-isolation"
196+ pip install setuptools wheel "cython >= 0.29, < 3.1"
197+ ;;
198+ esac
192199 cd ${{ env.PKGDIR }}
193200 python setup.py sdist
194201 pip wheel -w dist --no-deps ${kwds} dist/*.zip
@@ -205,7 +212,7 @@ jobs:
205212 arch :
206213 ["x64", "x86"]
207214 python-version :
208- ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
215+ ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
209216 max-parallel : 3
210217 fail-fast : false
211218 needs : build
@@ -250,7 +257,16 @@ jobs:
250257 arch :
251258 ["x64", "x86"]
252259 python-version :
253- ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
260+ ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
261+ exclude :
262+ # Missing precompiled binaries for `numpy`, `matplotlib`, `pillow`
263+ # and `lxml`.
264+ - arch : " x64"
265+ python-version : " 3.12"
266+ # Missing precompiled binaries for `numpy`, `matplotlib`, `pyproj`,
267+ # `pillow` and `lxml`.
268+ - arch : " x86"
269+ python-version : " 3.12"
254270 max-parallel : 3
255271 fail-fast : false
256272 needs : repair
@@ -347,7 +363,7 @@ jobs:
347363 arch :
348364 ["x64", "x86"]
349365 python-version :
350- ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
366+ ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
351367 max-parallel : 1
352368 if : startsWith(github.event.ref, 'refs/tags/v')
353369 needs : test
0 commit comments