Skip to content

Commit 974e092

Browse files
committedOct 31, 2022
Merge branch 'hotfix-1.3.6'
2 parents f37aed3 + 7beeca8 commit 974e092

11 files changed

+94
-51
lines changed
 

‎.github/workflows/basemap-data-hires.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: basemap-data-hires
33
env:
44
PKGDIR: "packages/basemap_data_hires"
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

810
on:
911
push:
@@ -65,7 +67,7 @@ jobs:
6567
matrix:
6668
python-version:
6769
["2.6", "2.7", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8",
68-
"3.9", "3.10"]
70+
"3.9", "3.10", "3.11"]
6971
max-parallel: 3
7072
fail-fast: false
7173
needs: build

‎.github/workflows/basemap-data.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: basemap-data
33
env:
44
PKGDIR: "packages/basemap_data"
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

810
on:
911
push:
@@ -65,7 +67,7 @@ jobs:
6567
matrix:
6668
python-version:
6769
["2.6", "2.7", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8",
68-
"3.9", "3.10"]
70+
"3.9", "3.10", "3.11"]
6971
max-parallel: 3
7072
fail-fast: false
7173
needs: build

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

+31-24
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: basemap-for-manylinux
33
env:
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

810
on:
911
push:
@@ -36,7 +38,7 @@ jobs:
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

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

+21-14
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: basemap-for-windows
33
env:
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

810
on:
911
push:
@@ -19,7 +21,7 @@ on:
1921
jobs:
2022

2123
checkout:
22-
runs-on: windows-latest
24+
runs-on: windows-2019
2325
steps:
2426
-
2527
name: Checkout
@@ -32,11 +34,11 @@ jobs:
3234
path: .
3335

3436
lint:
35-
runs-on: windows-latest
37+
runs-on: windows-2019
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
@@ -90,11 +92,11 @@ jobs:
9092
arch:
9193
["x64", "x86"]
9294
msvc-toolset:
93-
["9.0", "14.16"]
95+
["9.0", "14.0"]
9496
max-parallel: 4
9597
fail-fast: false
9698
needs: lint
97-
runs-on: windows-latest
99+
runs-on: windows-2019
98100
steps:
99101
-
100102
name: Download checkout
@@ -137,11 +139,11 @@ jobs:
137139
arch:
138140
["x64", "x86"]
139141
python-version:
140-
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
142+
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
141143
max-parallel: 3
142144
fail-fast: false
143145
needs: build-geos
144-
runs-on: windows-latest
146+
runs-on: windows-2019
145147
steps:
146148
-
147149
name: Download checkout
@@ -155,7 +157,7 @@ jobs:
155157
if ("${{ matrix.python-version }}" -eq "2.7") {
156158
echo "msvc-toolset=9.0" >> $env:GITHUB_ENV
157159
} else {
158-
echo "msvc-toolset=14.16" >> $env:GITHUB_ENV
160+
echo "msvc-toolset=14.0" >> $env:GITHUB_ENV
159161
}
160162
-
161163
name: Set MSVC toolset
@@ -179,7 +181,8 @@ jobs:
179181
Switch -regex ("${{ matrix.python-version }}") {
180182
"^2\.6|3\.[123]$" { Set-Variable -Name "pkgvers" -Value "1.11.3" }
181183
"^2\.7|3\.[456789]$" { Set-Variable -Name "pkgvers" -Value "1.16.6" }
182-
default { Set-Variable -Name "pkgvers" -Value "1.21.4" }
184+
"^3\.10$" { Set-Variable -Name "pkgvers" -Value "1.21.4" }
185+
default { Set-Variable -Name "pkgvers" -Value "1.23.3" }
183186
}
184187
$env:SETUPTOOLS_USE_DISTUTILS = "stdlib"
185188
python -m pip install "numpy == ${pkgvers}"
@@ -210,11 +213,11 @@ jobs:
210213
arch:
211214
["x64", "x86"]
212215
python-version:
213-
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
216+
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
214217
max-parallel: 3
215218
fail-fast: false
216219
needs: build
217-
runs-on: windows-latest
220+
runs-on: windows-2019
218221
steps:
219222
-
220223
name: Set Python
@@ -232,23 +235,27 @@ jobs:
232235
name: Install package
233236
run: |
234237
pip install --prefer-binary (Get-Item ${{ env.PKGDIR }}/dist/*-win*.whl)
238+
# We need to skip Py311 x86 because of missing pyproj wheels.
239+
if: matrix.arch != 'x86' || matrix.python-version != '3.11'
235240
-
236241
name: Test package
237242
run: |
238243
python -c "from mpl_toolkits.basemap import Basemap"
239244
python -c "from mpl_toolkits.basemap import cm"
245+
# We need to skip Py311 x86 because of missing pyproj wheels.
246+
if: matrix.arch != 'x86' || matrix.python-version != '3.11'
240247

241248
upload:
242249
strategy:
243250
matrix:
244251
arch:
245252
["x64", "x86"]
246253
python-version:
247-
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
254+
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
248255
max-parallel: 1
249256
if: startsWith(github.event.ref, 'refs/tags/v')
250257
needs: test
251-
runs-on: windows-latest
258+
runs-on: windows-2019
252259
environment: PyPI
253260
steps:
254261
-

‎CHANGELOG.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ https://keepachangelog.com/en/1.0.0/
1010
https://semver.org/spec/v2.0.0.html
1111

1212

13+
## [1.3.6] - 2022-10-31
14+
15+
### Added
16+
- Support for Python 3.11 (PR [#563], solves issue [#561]).
17+
- Optional argument `toolset` in `GeosLibrary.build` method.
18+
19+
### Changed
20+
- Upgrade `matplotlib` upper pin to 3.7.
21+
- Upgrade `pyproj` upper pin to 3.5.
22+
23+
### Fixed
24+
- Set MSVC 14.0 (VS2015) to build the precompiled Windows wheels in
25+
GitHub workflows (PR [#564]).
26+
1327
## [1.3.5] - 2022-10-25
1428

1529
### Fixed
@@ -934,6 +948,12 @@ https://semver.org/spec/v2.0.0.html
934948
- Fix glitches in drawing of parallels and meridians.
935949

936950

951+
[#564]:
952+
https://github.com/matplotlib/basemap/pull/564
953+
[#563]:
954+
https://github.com/matplotlib/basemap/pull/563
955+
[#561]:
956+
https://github.com/matplotlib/basemap/issues/561
937957
[#560]:
938958
https://github.com/matplotlib/basemap/pull/560
939959
[#559]:
@@ -1020,7 +1040,9 @@ https://github.com/matplotlib/basemap/issues/228
10201040
https://github.com/matplotlib/basemap/issues/179
10211041

10221042
[Unreleased]:
1023-
https://github.com/matplotlib/basemap/compare/v1.3.5...develop
1043+
https://github.com/matplotlib/basemap/compare/v1.3.6...develop
1044+
[1.3.6]:
1045+
https://github.com/matplotlib/basemap/compare/v1.3.5...v1.3.6
10241046
[1.3.5]:
10251047
https://github.com/matplotlib/basemap/compare/v1.3.4...v1.3.5
10261048
[1.3.4]:

‎packages/basemap/pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
requires = [
33
'setuptools',
44
'wheel',
5-
'numpy == 1.21.4; python_version >= "3.10"',
5+
'numpy == 1.23.3; python_version >= "3.11"',
6+
'numpy == 1.21.4; python_version == "3.10"',
67
'numpy == 1.21.4; sys_platform == "darwin" and (python_version >= "3.7" and python_version <= "3.9")',
78
'numpy == 1.16.6; sys_platform != "darwin" and (python_version >= "3.7" and python_version <= "3.9")',
89
'numpy == 1.16.6; python_version == "2.7" or (python_version >= "3.4" and python_version <= "3.6")',

‎packages/basemap/requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ matplotlib >= 1.5, < 3.0; python_version == "2.7"
1818
matplotlib >= 1.5, < 2.0; python_version == "3.2"
1919
matplotlib >= 1.5, < 2.0; python_version == "3.3"
2020
matplotlib >= 1.5, < 3.0; python_version == "3.4"
21-
matplotlib >= 1.5, < 3.6; python_version >= "3.5"
21+
matplotlib >= 1.5, < 3.7; python_version >= "3.5"
2222

2323
pyproj >= 1.9.3, < 2.1.0; python_version == "2.6"
2424
pyproj >= 1.9.3, < 2.3.0; python_version == "2.7"
2525
pyproj >= 1.9.3, < 1.9.6; python_version == "3.2"
2626
pyproj >= 1.9.3, < 2.1.0; python_version == "3.3"
2727
pyproj >= 1.9.3, < 2.1.0; python_version == "3.4"
28-
pyproj >= 1.9.3, < 3.4.0; python_version >= "3.5"
28+
pyproj >= 1.9.3, < 3.5.0; python_version >= "3.5"
2929

3030
pyshp >= 1.2, < 2.0; python_version == "2.6"
3131
pyshp >= 1.2, < 2.4; python_version >= "2.7"

‎packages/basemap/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def run(self):
172172
"name":
173173
"basemap",
174174
"version":
175-
"1.3.5",
175+
"1.3.6",
176176
"license":
177177
"MIT",
178178
"description":

‎packages/basemap/src/mpl_toolkits/basemap/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
import functools
5555

5656

57-
__version__ = "1.3.5"
57+
__version__ = "1.3.6"
5858

5959
# basemap data files now installed in lib/matplotlib/toolkits/basemap/data
6060
# check to see if environment variable BASEMAPDATA set to a directory,

‎packages/basemap/src/mpl_toolkits/basemap/proj.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from matplotlib.cbook import dedent
1212

1313

14-
__version__ = "1.3.5"
14+
__version__ = "1.3.6"
1515

1616
_dg2rad = math.radians(1.)
1717
_rad2dg = math.degrees(1.)

‎packages/basemap/utils/GeosLibrary.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def extract(self, overwrite=True):
213213
line = line.replace(oldtext2, newtext2)
214214
fd.write(line.encode())
215215

216-
def build(self, installdir=None, njobs=1):
216+
def build(self, installdir=None, toolset=None, njobs=1):
217217
"""Build and install GEOS from source."""
218218

219219
# Download and extract zip file if not present.
@@ -242,8 +242,10 @@ def build(self, installdir=None, njobs=1):
242242

243243
# Define custom configure and build options.
244244
if os.name == "nt":
245-
config_opts += ["-DCMAKE_CXX_FLAGS='/wd4251 /wd4458 /wd4530'"]
245+
config_opts += ["-DCMAKE_CXX_FLAGS='/wd4251 /wd4458 /wd4530 /EHsc'"]
246246
if version >= (3, 6, 0) and sys.version_info[:2] >= (3, 3):
247+
if toolset is not None:
248+
config_opts += ["-DCMAKE_GENERATOR_TOOLSET={0}".format(toolset)]
247249
build_opts = ["-j", "{0:d}".format(njobs)] + build_opts
248250
else:
249251
win64 = (8 * struct.calcsize("P") == 64)

0 commit comments

Comments
 (0)
Please sign in to comment.