Skip to content

Commit 704f520

Browse files
committed
Downgrade numpy build requirement from 1.21.4 to 1.21.1
In principle, it is possible to use NumPy up to version 1.21.4 when building for Python >= 3.7, but the problem is that NumPy versions from 1.21.2 to 1.21.6 add an explicit upper pin '<3.11' which prevents `basemap` from being built successfully with the recently released Python 3.11. Since the goal here is to build the wheels with an old-enough NumPy, we try here by downgrading NumPy at the build stage from 1.21.4 to 1.21.1, since NumPy 1.21.1 did not have this '<3.11'. Note that we cannot go below NumPy 1.21.0 because then the MacOS builds will fail due to a NumPy build bug.
1 parent c560877 commit 704f520

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/basemap-for-manylinux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ 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+
*) pkgvers=1.21.1;;
162162
esac
163163
pip install "numpy == ${pkgvers}"
164164
-

.github/workflows/basemap-for-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ jobs:
179179
Switch -regex ("${{ matrix.python-version }}") {
180180
"^2\.6|3\.[123]$" { Set-Variable -Name "pkgvers" -Value "1.11.3" }
181181
"^2\.7|3\.[456789]$" { Set-Variable -Name "pkgvers" -Value "1.16.6" }
182-
default { Set-Variable -Name "pkgvers" -Value "1.21.4" }
182+
default { Set-Variable -Name "pkgvers" -Value "1.21.1" }
183183
}
184184
$env:SETUPTOOLS_USE_DISTUTILS = "stdlib"
185185
python -m pip install "numpy == ${pkgvers}"

packages/basemap/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
requires = [
33
'setuptools',
44
'wheel',
5-
'numpy == 1.21.4; python_version >= "3.10"',
6-
'numpy == 1.21.4; sys_platform == "darwin" and (python_version >= "3.7" and python_version <= "3.9")',
5+
'numpy == 1.21.1; python_version >= "3.10"',
6+
'numpy == 1.21.1; sys_platform == "darwin" and (python_version >= "3.7" and python_version <= "3.9")',
77
'numpy == 1.16.6; sys_platform != "darwin" and (python_version >= "3.7" and python_version <= "3.9")',
88
'numpy == 1.16.6; python_version == "2.7" or (python_version >= "3.4" and python_version <= "3.6")',
99
'numpy == 1.11.3; python_version == "2.6" or (python_version >= "3.2" and python_version <= "3.3")',

0 commit comments

Comments
 (0)