From f304fb11e2122adc43c53f7798a86e84cd9e228b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sat, 29 Oct 2022 12:04:53 +0200 Subject: [PATCH 01/19] Upgrade pyproj upper pin to 3.5 --- CHANGELOG.md | 9 ++++++++- packages/basemap/requirements.txt | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2925cd18d..a6ca65767 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ https://keepachangelog.com/en/1.0.0/ https://semver.org/spec/v2.0.0.html +## [1.3.6] + +### Changed +- Upgrade `pyproj` upper pin to 3.5. + ## [1.3.5] - 2022-10-25 ### Fixed @@ -1020,7 +1025,9 @@ https://github.com/matplotlib/basemap/issues/228 https://github.com/matplotlib/basemap/issues/179 [Unreleased]: -https://github.com/matplotlib/basemap/compare/v1.3.5...develop +https://github.com/matplotlib/basemap/compare/v1.3.6...develop +[1.3.6]: +https://github.com/matplotlib/basemap/compare/v1.3.5...v1.3.6 [1.3.5]: https://github.com/matplotlib/basemap/compare/v1.3.4...v1.3.5 [1.3.4]: diff --git a/packages/basemap/requirements.txt b/packages/basemap/requirements.txt index db0507765..090ba3982 100644 --- a/packages/basemap/requirements.txt +++ b/packages/basemap/requirements.txt @@ -25,7 +25,7 @@ pyproj >= 1.9.3, < 2.3.0; python_version == "2.7" pyproj >= 1.9.3, < 1.9.6; python_version == "3.2" pyproj >= 1.9.3, < 2.1.0; python_version == "3.3" pyproj >= 1.9.3, < 2.1.0; python_version == "3.4" -pyproj >= 1.9.3, < 3.4.0; python_version >= "3.5" +pyproj >= 1.9.3, < 3.5.0; python_version >= "3.5" pyshp >= 1.2, < 2.0; python_version == "2.6" pyshp >= 1.2, < 2.4; python_version >= "2.7" From c56087760ea0a9e0912ded1f92c78840f9414f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sat, 29 Oct 2022 12:05:51 +0200 Subject: [PATCH 02/19] Upgrade matplotlib upper pin to 3.7 --- CHANGELOG.md | 1 + packages/basemap/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6ca65767..d01577549 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ https://semver.org/spec/v2.0.0.html ## [1.3.6] ### Changed +- Upgrade `matplotlib` upper pin to 3.7. - Upgrade `pyproj` upper pin to 3.5. ## [1.3.5] - 2022-10-25 diff --git a/packages/basemap/requirements.txt b/packages/basemap/requirements.txt index 090ba3982..91fbe93b7 100644 --- a/packages/basemap/requirements.txt +++ b/packages/basemap/requirements.txt @@ -18,7 +18,7 @@ matplotlib >= 1.5, < 3.0; python_version == "2.7" matplotlib >= 1.5, < 2.0; python_version == "3.2" matplotlib >= 1.5, < 2.0; python_version == "3.3" matplotlib >= 1.5, < 3.0; python_version == "3.4" -matplotlib >= 1.5, < 3.6; python_version >= "3.5" +matplotlib >= 1.5, < 3.7; python_version >= "3.5" pyproj >= 1.9.3, < 2.1.0; python_version == "2.6" pyproj >= 1.9.3, < 2.3.0; python_version == "2.7" From 704f52069c66a1265ba02ba18b1a511f71c1af95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sat, 29 Oct 2022 12:29:25 +0200 Subject: [PATCH 03/19] 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. --- .github/workflows/basemap-for-manylinux.yml | 2 +- .github/workflows/basemap-for-windows.yml | 2 +- packages/basemap/pyproject.toml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index c7e0d83f9..2b6be4d70 100644 --- a/.github/workflows/basemap-for-manylinux.yml +++ b/.github/workflows/basemap-for-manylinux.yml @@ -158,7 +158,7 @@ jobs: case "${{ matrix.python-version }}" in 2.6|3.[23]) pkgvers=1.11.3;; 2.7|3.[456789]) pkgvers=1.16.6;; - *) pkgvers=1.21.4;; + *) pkgvers=1.21.1;; esac pip install "numpy == ${pkgvers}" - diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml index d9e68ce25..c8fdd18b0 100644 --- a/.github/workflows/basemap-for-windows.yml +++ b/.github/workflows/basemap-for-windows.yml @@ -179,7 +179,7 @@ jobs: Switch -regex ("${{ matrix.python-version }}") { "^2\.6|3\.[123]$" { Set-Variable -Name "pkgvers" -Value "1.11.3" } "^2\.7|3\.[456789]$" { Set-Variable -Name "pkgvers" -Value "1.16.6" } - default { Set-Variable -Name "pkgvers" -Value "1.21.4" } + default { Set-Variable -Name "pkgvers" -Value "1.21.1" } } $env:SETUPTOOLS_USE_DISTUTILS = "stdlib" python -m pip install "numpy == ${pkgvers}" diff --git a/packages/basemap/pyproject.toml b/packages/basemap/pyproject.toml index f9a33dfc0..d4194b6db 100644 --- a/packages/basemap/pyproject.toml +++ b/packages/basemap/pyproject.toml @@ -2,8 +2,8 @@ requires = [ 'setuptools', 'wheel', - 'numpy == 1.21.4; python_version >= "3.10"', - 'numpy == 1.21.4; sys_platform == "darwin" and (python_version >= "3.7" and python_version <= "3.9")', + 'numpy == 1.21.1; python_version >= "3.10"', + 'numpy == 1.21.1; sys_platform == "darwin" and (python_version >= "3.7" and python_version <= "3.9")', 'numpy == 1.16.6; sys_platform != "darwin" and (python_version >= "3.7" and python_version <= "3.9")', 'numpy == 1.16.6; python_version == "2.7" or (python_version >= "3.4" and python_version <= "3.6")', 'numpy == 1.11.3; python_version == "2.6" or (python_version >= "3.2" and python_version <= "3.3")', From 12d93a589a6dd2fab896a18af9de4a7895dd96f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sat, 29 Oct 2022 15:28:55 +0200 Subject: [PATCH 04/19] Add Python 3.11 to basemap-for-windows workflow --- .github/workflows/basemap-for-windows.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml index c8fdd18b0..92038463c 100644 --- a/.github/workflows/basemap-for-windows.yml +++ b/.github/workflows/basemap-for-windows.yml @@ -36,7 +36,7 @@ jobs: strategy: matrix: python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] max-parallel: 3 fail-fast: false needs: checkout @@ -137,7 +137,7 @@ jobs: arch: ["x64", "x86"] python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] max-parallel: 3 fail-fast: false needs: build-geos @@ -210,7 +210,7 @@ jobs: arch: ["x64", "x86"] python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] max-parallel: 3 fail-fast: false needs: build @@ -244,7 +244,7 @@ jobs: arch: ["x64", "x86"] python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] max-parallel: 1 if: startsWith(github.event.ref, 'refs/tags/v') needs: test From 65fbaae9648f9a827feb7a7739adf9abd49ce132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sat, 29 Oct 2022 16:10:02 +0200 Subject: [PATCH 05/19] Revert numpy downgrade and set to 1.23.3 for Python 3.11 --- .github/workflows/basemap-for-manylinux.yml | 3 ++- .github/workflows/basemap-for-windows.yml | 3 ++- packages/basemap/pyproject.toml | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index 2b6be4d70..9e7d897c8 100644 --- a/.github/workflows/basemap-for-manylinux.yml +++ b/.github/workflows/basemap-for-manylinux.yml @@ -158,7 +158,8 @@ jobs: case "${{ matrix.python-version }}" in 2.6|3.[23]) pkgvers=1.11.3;; 2.7|3.[456789]) pkgvers=1.16.6;; - *) pkgvers=1.21.1;; + 3.10) pkgvers=1.21.4;; + *) pkgvers=1.23.3;; esac pip install "numpy == ${pkgvers}" - diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml index 92038463c..e64251b48 100644 --- a/.github/workflows/basemap-for-windows.yml +++ b/.github/workflows/basemap-for-windows.yml @@ -179,7 +179,8 @@ jobs: Switch -regex ("${{ matrix.python-version }}") { "^2\.6|3\.[123]$" { Set-Variable -Name "pkgvers" -Value "1.11.3" } "^2\.7|3\.[456789]$" { Set-Variable -Name "pkgvers" -Value "1.16.6" } - default { Set-Variable -Name "pkgvers" -Value "1.21.1" } + "^3\.10$" { Set-Variable -Name "pkgvers" -Value "1.21.4" } + default { Set-Variable -Name "pkgvers" -Value "1.23.3" } } $env:SETUPTOOLS_USE_DISTUTILS = "stdlib" python -m pip install "numpy == ${pkgvers}" diff --git a/packages/basemap/pyproject.toml b/packages/basemap/pyproject.toml index d4194b6db..26e78d87a 100644 --- a/packages/basemap/pyproject.toml +++ b/packages/basemap/pyproject.toml @@ -2,8 +2,9 @@ requires = [ 'setuptools', 'wheel', - 'numpy == 1.21.1; python_version >= "3.10"', - 'numpy == 1.21.1; sys_platform == "darwin" and (python_version >= "3.7" and python_version <= "3.9")', + 'numpy == 1.23.3; python_version >= "3.11"', + 'numpy == 1.21.4; python_version == "3.10"', + 'numpy == 1.21.4; sys_platform == "darwin" and (python_version >= "3.7" and python_version <= "3.9")', 'numpy == 1.16.6; sys_platform != "darwin" and (python_version >= "3.7" and python_version <= "3.9")', 'numpy == 1.16.6; python_version == "2.7" or (python_version >= "3.4" and python_version <= "3.6")', 'numpy == 1.11.3; python_version == "2.6" or (python_version >= "3.2" and python_version <= "3.3")', From e4eb2003e1127e61e8b19cdfd3fc80dca5f8ddd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sat, 29 Oct 2022 18:45:08 +0200 Subject: [PATCH 06/19] Skip tests for py311-win32 due to missing pyproj wheel --- .github/workflows/basemap-for-windows.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml index e64251b48..6107dea94 100644 --- a/.github/workflows/basemap-for-windows.yml +++ b/.github/workflows/basemap-for-windows.yml @@ -233,11 +233,15 @@ jobs: name: Install package run: | pip install --prefer-binary (Get-Item ${{ env.PKGDIR }}/dist/*-win*.whl) + # We need to skip Py311 x86 because of missing pyproj wheels. + if: matrix.arch != 'x86' || matrix.python-version != '3.11' - name: Test package run: | python -c "from mpl_toolkits.basemap import Basemap" python -c "from mpl_toolkits.basemap import cm" + # We need to skip Py311 x86 because of missing pyproj wheels. + if: matrix.arch != 'x86' || matrix.python-version != '3.11' upload: strategy: From 20e9cc650ebe82ec2e1c3a2165dcaffd9feab799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sat, 29 Oct 2022 23:20:11 +0200 Subject: [PATCH 07/19] Add Python 3.11 to basemap-for-manylinux workflow --- .github/workflows/basemap-for-manylinux.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index 9e7d897c8..c6e5f4f44 100644 --- a/.github/workflows/basemap-for-manylinux.yml +++ b/.github/workflows/basemap-for-manylinux.yml @@ -36,7 +36,7 @@ jobs: strategy: matrix: python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] max-parallel: 3 fail-fast: false needs: checkout @@ -128,7 +128,7 @@ jobs: arch: ["x64", "x86"] python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] max-parallel: 3 fail-fast: false needs: build-geos @@ -184,7 +184,7 @@ jobs: arch: ["x64", "x86"] python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] max-parallel: 3 fail-fast: false needs: build @@ -236,7 +236,7 @@ jobs: arch: ["x64", "x86"] python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] max-parallel: 3 fail-fast: false needs: repair @@ -285,7 +285,7 @@ jobs: arch: ["x64", "x86"] python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] max-parallel: 1 if: startsWith(github.event.ref, 'refs/tags/v') needs: test From 3b83cd3d26084eaaef1810eda732868c4aad8942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sun, 30 Oct 2022 18:52:22 +0100 Subject: [PATCH 08/19] Add workaround to get NumPy headers for Python 3.11 --- .github/workflows/basemap-for-manylinux.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index c6e5f4f44..ac9ea164b 100644 --- a/.github/workflows/basemap-for-manylinux.yml +++ b/.github/workflows/basemap-for-manylinux.yml @@ -161,6 +161,19 @@ jobs: 3.10) pkgvers=1.21.4;; *) pkgvers=1.23.3;; esac + if [ "${pkgvers}" = "1.23.3" ]; then + # Dirty solution to get NumPy headers for Python 3.11. + case "${{ matrix.arch }}" in + x64) kwds="--plat=manylinux_2_17_x86_64" ;; + x86) kwds="--plat=manylinux_2_17_i686" ;; + esac + pip download --no-deps ${kwds} "numpy==1.23.3" + oldpkgfile=$(ls *.whl | head -n1) + newpkgfile=$(echo "${oldpkgfile}" | sed 's/manylinux_2_17/linux/') + mv "${oldpkgfile}" "${newpkgfile}" + pip install "${newpkgfile}" + rm "${newpkgfile}" + fi pip install "numpy == ${pkgvers}" - name: Build wheel @@ -168,9 +181,13 @@ jobs: sitepkgdir=$(pip show numpy 2>/dev/null | grep Location: | cut -d' ' -f2) export GEOS_DIR="${GITHUB_WORKSPACE}/${{ env.PKGDIR }}/extern" export NUMPY_INCLUDE_PATH=${sitepkgdir}/numpy/core/include + if [ "${{ matrix.python-version }}" = "3.11" ]; then + kwds="--no-build-isolation" + pip install setuptools wheel "cython >= 0.29, < 3.1" + fi cd ${{ env.PKGDIR }} python setup.py sdist - pip wheel -w dist --no-deps dist/*.zip + pip wheel -w dist --no-deps ${kwds} dist/*.zip - name: Upload build artifacts uses: actions/upload-artifact@v1 From 06379307583e4b1c95bb46c8a976ffe661cb3e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sun, 30 Oct 2022 22:48:22 +0100 Subject: [PATCH 09/19] Refactor Py311 special blocks in basemap-for-manylinux --- .github/workflows/basemap-for-manylinux.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index ac9ea164b..36f4d66ca 100644 --- a/.github/workflows/basemap-for-manylinux.yml +++ b/.github/workflows/basemap-for-manylinux.yml @@ -161,20 +161,21 @@ jobs: 3.10) pkgvers=1.21.4;; *) pkgvers=1.23.3;; esac - if [ "${pkgvers}" = "1.23.3" ]; then - # Dirty solution to get NumPy headers for Python 3.11. + # Dirty solution to get NumPy headers for Python 3.11. + if [ "${{ matrix.python-version }}" = "3.11" ]; then case "${{ matrix.arch }}" in - x64) kwds="--plat=manylinux_2_17_x86_64" ;; - x86) kwds="--plat=manylinux_2_17_i686" ;; + x64) kwds="--plat=manylinux_2_17_x86_64" ;; + x86) kwds="--plat=manylinux_2_17_i686" ;; esac - pip download --no-deps ${kwds} "numpy==1.23.3" + pip download --no-deps ${kwds} "numpy==${pkgvers}" oldpkgfile=$(ls *.whl | head -n1) newpkgfile=$(echo "${oldpkgfile}" | sed 's/manylinux_2_17/linux/') mv "${oldpkgfile}" "${newpkgfile}" pip install "${newpkgfile}" rm "${newpkgfile}" + else + pip install "numpy == ${pkgvers}" fi - pip install "numpy == ${pkgvers}" - name: Build wheel run: | From 7fcada1a722180c65e15a977f02dccb9210bfb78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sun, 30 Oct 2022 23:25:04 +0100 Subject: [PATCH 10/19] Join unzip/patchelf/auditwheel steps in basemap-for-manylinux --- .github/workflows/basemap-for-manylinux.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index 36f4d66ca..954bc7069 100644 --- a/.github/workflows/basemap-for-manylinux.yml +++ b/.github/workflows/basemap-for-manylinux.yml @@ -222,18 +222,11 @@ jobs: name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} path: ${{ env.PKGDIR }}/dist - - name: Install unzip + name: Install auditwheel run: | apt-get update apt-get install -y unzip - - - name: Install patchelf - run: | pip install patchelf - alias patchelf="python -m patchelf" - - - name: Install auditwheel - run: | pip install "auditwheel < 4.0" - name: Repair wheel From 2dbc76e0c1e396b589c99db55bc6893e42749ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sun, 30 Oct 2022 23:32:22 +0100 Subject: [PATCH 11/19] Remove matplotlib sdist installation step --- .github/workflows/basemap-for-manylinux.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index 954bc7069..c6c0bba86 100644 --- a/.github/workflows/basemap-for-manylinux.yml +++ b/.github/workflows/basemap-for-manylinux.yml @@ -266,13 +266,6 @@ jobs: with: name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} path: ${{ env.PKGDIR }}/dist - - - name: Install matplotlib dependencies - run: | - apt-get update - apt-get install -y gcc g++ make - apt-get install -y pkg-config libfreetype6-dev libpng12-dev - if: matrix.arch == 'x86' && matrix.python-version == '3.5' - name: Install numpy from source run: | From bf27e41132cbabfe659d89efa9bd4920d463bd18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Mon, 31 Oct 2022 08:04:23 +0100 Subject: [PATCH 12/19] Update CHANGELOG --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d01577549..064df3ab9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ https://semver.org/spec/v2.0.0.html ## [1.3.6] +### Added +- Support for Python 3.11 (PR [#563], solves issue [#561]). + ### Changed - Upgrade `matplotlib` upper pin to 3.7. - Upgrade `pyproj` upper pin to 3.5. @@ -940,6 +943,10 @@ https://semver.org/spec/v2.0.0.html - Fix glitches in drawing of parallels and meridians. +[#563]: +https://github.com/matplotlib/basemap/pull/563 +[#561]: +https://github.com/matplotlib/basemap/issues/561 [#560]: https://github.com/matplotlib/basemap/pull/560 [#559]: From feea4246a4a9808139399ad46de9567bbed2a461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Mon, 31 Oct 2022 08:10:10 +0100 Subject: [PATCH 13/19] Force MSVC 14.0 to build Windows wheels --- .github/workflows/basemap-for-windows.yml | 4 ++-- CHANGELOG.md | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml index d9e68ce25..4218a703b 100644 --- a/.github/workflows/basemap-for-windows.yml +++ b/.github/workflows/basemap-for-windows.yml @@ -90,7 +90,7 @@ jobs: arch: ["x64", "x86"] msvc-toolset: - ["9.0", "14.16"] + ["9.0", "14.0"] max-parallel: 4 fail-fast: false needs: lint @@ -155,7 +155,7 @@ jobs: if ("${{ matrix.python-version }}" -eq "2.7") { echo "msvc-toolset=9.0" >> $env:GITHUB_ENV } else { - echo "msvc-toolset=14.16" >> $env:GITHUB_ENV + echo "msvc-toolset=14.0" >> $env:GITHUB_ENV } - name: Set MSVC toolset diff --git a/CHANGELOG.md b/CHANGELOG.md index d01577549..b3cfb1497 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ https://semver.org/spec/v2.0.0.html - Upgrade `matplotlib` upper pin to 3.7. - Upgrade `pyproj` upper pin to 3.5. +### Fixed +- Set MSVC 14.0 (VS2015) to build the precompiled Windows wheels in + GitHub workflows. + ## [1.3.5] - 2022-10-25 ### Fixed From 6bf7664fd1ded2ed21df9f1516026ec3b056fcaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Mon, 31 Oct 2022 08:28:47 +0100 Subject: [PATCH 14/19] Change Windows runner agent to windows-2019 --- .github/workflows/basemap-for-windows.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml index 4218a703b..7d6a08d8a 100644 --- a/.github/workflows/basemap-for-windows.yml +++ b/.github/workflows/basemap-for-windows.yml @@ -19,7 +19,7 @@ on: jobs: checkout: - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Checkout @@ -32,7 +32,7 @@ jobs: path: . lint: - runs-on: windows-latest + runs-on: windows-2019 strategy: matrix: python-version: @@ -94,7 +94,7 @@ jobs: max-parallel: 4 fail-fast: false needs: lint - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Download checkout @@ -141,7 +141,7 @@ jobs: max-parallel: 3 fail-fast: false needs: build-geos - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Download checkout @@ -214,7 +214,7 @@ jobs: max-parallel: 3 fail-fast: false needs: build - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Set Python @@ -248,7 +248,7 @@ jobs: max-parallel: 1 if: startsWith(github.event.ref, 'refs/tags/v') needs: test - runs-on: windows-latest + runs-on: windows-2019 environment: PyPI steps: - From 36f768e24a857d4a23efd8e15a7dabd632b89d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Mon, 31 Oct 2022 11:43:17 +0100 Subject: [PATCH 15/19] Add /EHsc to GEOS CXX flags on Windows --- packages/basemap/utils/GeosLibrary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/basemap/utils/GeosLibrary.py b/packages/basemap/utils/GeosLibrary.py index 84eff4e51..dec0ea458 100644 --- a/packages/basemap/utils/GeosLibrary.py +++ b/packages/basemap/utils/GeosLibrary.py @@ -242,7 +242,7 @@ def build(self, installdir=None, njobs=1): # Define custom configure and build options. if os.name == "nt": - config_opts += ["-DCMAKE_CXX_FLAGS='/wd4251 /wd4458 /wd4530'"] + config_opts += ["-DCMAKE_CXX_FLAGS='/wd4251 /wd4458 /wd4530 /EHsc'"] if version >= (3, 6, 0) and sys.version_info[:2] >= (3, 3): build_opts = ["-j", "{0:d}".format(njobs)] + build_opts else: From 0be70176faf44a017e2eaf6976c9947473116856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Mon, 31 Oct 2022 12:35:08 +0100 Subject: [PATCH 16/19] Add optional argument toolset to GeosLibrary.build --- CHANGELOG.md | 3 +++ packages/basemap/utils/GeosLibrary.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3cfb1497..eb0aa7903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ https://semver.org/spec/v2.0.0.html ## [1.3.6] +### Added +- Optional argument `toolset` in `GeosLibrary.build` method. + ### Changed - Upgrade `matplotlib` upper pin to 3.7. - Upgrade `pyproj` upper pin to 3.5. diff --git a/packages/basemap/utils/GeosLibrary.py b/packages/basemap/utils/GeosLibrary.py index dec0ea458..abbb839c7 100644 --- a/packages/basemap/utils/GeosLibrary.py +++ b/packages/basemap/utils/GeosLibrary.py @@ -213,7 +213,7 @@ def extract(self, overwrite=True): line = line.replace(oldtext2, newtext2) fd.write(line.encode()) - def build(self, installdir=None, njobs=1): + def build(self, installdir=None, toolset=None, njobs=1): """Build and install GEOS from source.""" # Download and extract zip file if not present. @@ -244,6 +244,8 @@ def build(self, installdir=None, njobs=1): if os.name == "nt": config_opts += ["-DCMAKE_CXX_FLAGS='/wd4251 /wd4458 /wd4530 /EHsc'"] if version >= (3, 6, 0) and sys.version_info[:2] >= (3, 3): + if toolset is not None: + config_opts += ["-DCMAKE_GENERATOR_TOOLSET={0}".format(toolset)] build_opts = ["-j", "{0:d}".format(njobs)] + build_opts else: win64 = (8 * struct.calcsize("P") == 64) From aa373d9d708792764b9ef85ca92bc38605130a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Mon, 31 Oct 2022 17:36:50 +0100 Subject: [PATCH 17/19] Update pip environment variables in GitHub workflows --- .github/workflows/basemap-data-hires.yml | 4 +++- .github/workflows/basemap-data.yml | 4 +++- .github/workflows/basemap-for-manylinux.yml | 4 +++- .github/workflows/basemap-for-windows.yml | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basemap-data-hires.yml b/.github/workflows/basemap-data-hires.yml index fbd1a9eb5..304e2d1ce 100644 --- a/.github/workflows/basemap-data-hires.yml +++ b/.github/workflows/basemap-data-hires.yml @@ -3,7 +3,9 @@ name: basemap-data-hires env: PKGDIR: "packages/basemap_data_hires" PYTHONWARNINGS: "ignore:DEPRECATION" - PIP_DISABLE_PIP_VERSION_CHECK: "1" + PIP_DISABLE_PIP_VERSION_CHECK: 1 + PIP_TIMEOUT: 10 + PIP_RETRIES: 0 on: push: diff --git a/.github/workflows/basemap-data.yml b/.github/workflows/basemap-data.yml index c63c9a5d8..1e0f4519f 100644 --- a/.github/workflows/basemap-data.yml +++ b/.github/workflows/basemap-data.yml @@ -3,7 +3,9 @@ name: basemap-data env: PKGDIR: "packages/basemap_data" PYTHONWARNINGS: "ignore:DEPRECATION" - PIP_DISABLE_PIP_VERSION_CHECK: "1" + PIP_DISABLE_PIP_VERSION_CHECK: 1 + PIP_TIMEOUT: 10 + PIP_RETRIES: 0 on: push: diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index c6c0bba86..85f1bbff5 100644 --- a/.github/workflows/basemap-for-manylinux.yml +++ b/.github/workflows/basemap-for-manylinux.yml @@ -3,7 +3,9 @@ name: basemap-for-manylinux env: PKGDIR: "packages/basemap" PYTHONWARNINGS: "ignore:DEPRECATION" - PIP_DISABLE_PIP_VERSION_CHECK: "1" + PIP_DISABLE_PIP_VERSION_CHECK: 1 + PIP_TIMEOUT: 10 + PIP_RETRIES: 0 on: push: diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml index 15a711d78..3242acf6c 100644 --- a/.github/workflows/basemap-for-windows.yml +++ b/.github/workflows/basemap-for-windows.yml @@ -3,7 +3,9 @@ name: basemap-for-windows env: PKGDIR: "packages/basemap" PYTHONWARNINGS: "ignore:DEPRECATION" - PIP_DISABLE_PIP_VERSION_CHECK: "1" + PIP_DISABLE_PIP_VERSION_CHECK: 1 + PIP_TIMEOUT: 10 + PIP_RETRIES: 0 on: push: From 73d4f82c933ddb51a1125b6ab0e4b025b5175a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Mon, 31 Oct 2022 17:39:23 +0100 Subject: [PATCH 18/19] Prepare for hotfix release 1.3.6 --- CHANGELOG.md | 2 +- packages/basemap/setup.py | 2 +- packages/basemap/src/mpl_toolkits/basemap/__init__.py | 2 +- packages/basemap/src/mpl_toolkits/basemap/proj.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef54514c7..604b0656e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ https://keepachangelog.com/en/1.0.0/ https://semver.org/spec/v2.0.0.html -## [1.3.6] +## [1.3.6] - 2022-10-31 ### Added - Support for Python 3.11 (PR [#563], solves issue [#561]). diff --git a/packages/basemap/setup.py b/packages/basemap/setup.py index 88b36dd82..43698876c 100644 --- a/packages/basemap/setup.py +++ b/packages/basemap/setup.py @@ -172,7 +172,7 @@ def run(self): "name": "basemap", "version": - "1.3.5", + "1.3.6", "license": "MIT", "description": diff --git a/packages/basemap/src/mpl_toolkits/basemap/__init__.py b/packages/basemap/src/mpl_toolkits/basemap/__init__.py index ea37e2de0..8f5022c86 100644 --- a/packages/basemap/src/mpl_toolkits/basemap/__init__.py +++ b/packages/basemap/src/mpl_toolkits/basemap/__init__.py @@ -54,7 +54,7 @@ import functools -__version__ = "1.3.5" +__version__ = "1.3.6" # basemap data files now installed in lib/matplotlib/toolkits/basemap/data # check to see if environment variable BASEMAPDATA set to a directory, diff --git a/packages/basemap/src/mpl_toolkits/basemap/proj.py b/packages/basemap/src/mpl_toolkits/basemap/proj.py index e57dce5a2..9a56dacc8 100644 --- a/packages/basemap/src/mpl_toolkits/basemap/proj.py +++ b/packages/basemap/src/mpl_toolkits/basemap/proj.py @@ -11,7 +11,7 @@ from matplotlib.cbook import dedent -__version__ = "1.3.5" +__version__ = "1.3.6" _dg2rad = math.radians(1.) _rad2dg = math.degrees(1.) From 7beeca829c88e005acc09c1ec225593ce8ac1bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Mon, 31 Oct 2022 17:47:11 +0100 Subject: [PATCH 19/19] Add Python 3.11 to test of data packages --- .github/workflows/basemap-data-hires.yml | 2 +- .github/workflows/basemap-data.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basemap-data-hires.yml b/.github/workflows/basemap-data-hires.yml index 304e2d1ce..5cec79af0 100644 --- a/.github/workflows/basemap-data-hires.yml +++ b/.github/workflows/basemap-data-hires.yml @@ -67,7 +67,7 @@ jobs: matrix: python-version: ["2.6", "2.7", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", - "3.9", "3.10"] + "3.9", "3.10", "3.11"] max-parallel: 3 fail-fast: false needs: build diff --git a/.github/workflows/basemap-data.yml b/.github/workflows/basemap-data.yml index 1e0f4519f..e77ccc22a 100644 --- a/.github/workflows/basemap-data.yml +++ b/.github/workflows/basemap-data.yml @@ -67,7 +67,7 @@ jobs: matrix: python-version: ["2.6", "2.7", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", - "3.9", "3.10"] + "3.9", "3.10", "3.11"] max-parallel: 3 fail-fast: false needs: build