diff --git a/.github/workflows/basemap-data-hires.yml b/.github/workflows/basemap-data-hires.yml index fbd1a9eb5..5cec79af0 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: @@ -65,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 c63c9a5d8..e77ccc22a 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: @@ -65,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-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index c7e0d83f9..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: @@ -36,7 +38,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 +130,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 @@ -158,18 +160,37 @@ 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;; + 3.10) pkgvers=1.21.4;; + *) pkgvers=1.23.3;; esac - pip install "numpy == ${pkgvers}" + # 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" ;; + esac + 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 - name: Build wheel run: | 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 @@ -183,7 +204,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 @@ -203,18 +224,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 @@ -235,7 +249,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 @@ -254,13 +268,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: | @@ -284,7 +291,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 diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml index d9e68ce25..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: @@ -19,7 +21,7 @@ on: jobs: checkout: - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Checkout @@ -32,11 +34,11 @@ jobs: path: . lint: - runs-on: windows-latest + runs-on: windows-2019 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 @@ -90,11 +92,11 @@ jobs: arch: ["x64", "x86"] msvc-toolset: - ["9.0", "14.16"] + ["9.0", "14.0"] max-parallel: 4 fail-fast: false needs: lint - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Download checkout @@ -137,11 +139,11 @@ 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 - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Download checkout @@ -155,7 +157,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 @@ -179,7 +181,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.4" } + "^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}" @@ -210,11 +213,11 @@ 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 - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Set Python @@ -232,11 +235,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: @@ -244,11 +251,11 @@ 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 - runs-on: windows-latest + runs-on: windows-2019 environment: PyPI steps: - diff --git a/CHANGELOG.md b/CHANGELOG.md index 2925cd18d..604b0656e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,20 @@ https://keepachangelog.com/en/1.0.0/ https://semver.org/spec/v2.0.0.html +## [1.3.6] - 2022-10-31 + +### Added +- Support for Python 3.11 (PR [#563], solves issue [#561]). +- Optional argument `toolset` in `GeosLibrary.build` method. + +### Changed +- 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 (PR [#564]). + ## [1.3.5] - 2022-10-25 ### Fixed @@ -934,6 +948,12 @@ https://semver.org/spec/v2.0.0.html - Fix glitches in drawing of parallels and meridians. +[#564]: +https://github.com/matplotlib/basemap/pull/564 +[#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]: @@ -1020,7 +1040,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/pyproject.toml b/packages/basemap/pyproject.toml index f9a33dfc0..26e78d87a 100644 --- a/packages/basemap/pyproject.toml +++ b/packages/basemap/pyproject.toml @@ -2,7 +2,8 @@ requires = [ 'setuptools', 'wheel', - 'numpy == 1.21.4; python_version >= "3.10"', + '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")', diff --git a/packages/basemap/requirements.txt b/packages/basemap/requirements.txt index db0507765..91fbe93b7 100644 --- a/packages/basemap/requirements.txt +++ b/packages/basemap/requirements.txt @@ -18,14 +18,14 @@ 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" 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" 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.) diff --git a/packages/basemap/utils/GeosLibrary.py b/packages/basemap/utils/GeosLibrary.py index 84eff4e51..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. @@ -242,8 +242,10 @@ 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): + 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)