diff --git a/.github/workflows/basemap-data-hires.yml b/.github/workflows/basemap-data-hires.yml index edb242a1d..6f6c53687 100644 --- a/.github/workflows/basemap-data-hires.yml +++ b/.github/workflows/basemap-data-hires.yml @@ -46,10 +46,11 @@ jobs: name: checkout path: . - - name: Build wheel + name: Build sdist and wheel run: | cd ${{ env.PKGDIR }} - python setup.py sdist bdist_wheel --universal + python setup.py sdist + pip wheel -w dist --no-deps dist/*.zip - name: Upload build artifacts uses: actions/upload-artifact@v1 diff --git a/.github/workflows/basemap-data.yml b/.github/workflows/basemap-data.yml index 14dbb587a..51e0aed96 100644 --- a/.github/workflows/basemap-data.yml +++ b/.github/workflows/basemap-data.yml @@ -46,10 +46,11 @@ jobs: name: checkout path: . - - name: Build wheel + name: Build sdist and wheel run: | cd ${{ env.PKGDIR }} - python setup.py sdist bdist_wheel --universal + python setup.py sdist + pip wheel -w dist --no-deps dist/*.zip - name: Upload build artifacts uses: actions/upload-artifact@v1 diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index 21c0a1e56..f174a8fad 100644 --- a/.github/workflows/basemap-for-manylinux.yml +++ b/.github/workflows/basemap-for-manylinux.yml @@ -109,38 +109,23 @@ jobs: apt-get update apt-get install -y gcc g++ make - - name: Install unzip - run: | - apt-get update - apt-get install -y unzip - - - name: Generate NumPy headers + name: Build old numpy from source run: | 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;; esac - pkgname=numpy - pkgcode=numpy-${pkgvers} - python -m pip install cython - python -m pip download --no-binary=numpy "numpy == ${pkgvers}" - unzip ${pkgcode}.zip - rm -f ${pkgcode}.zip - cd ${pkgcode} - python setup.py build - cp build/src*/numpy/core/include/numpy/*.h numpy/core/include/numpy/ - cd .. - cp -R ${pkgcode}/numpy/core/include ${{ env.PKGDIR }}/extern - rm -rf ${pkgcode} + pip install "numpy == ${pkgvers}" - 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 cd ${{ env.PKGDIR }} - export GEOS_DIR=extern - export NUMPY_INCLUDE_PATH=extern/include - pip install -r requirements-setup.txt - python setup.py sdist bdist_wheel + python setup.py sdist + pip wheel -w dist --no-deps dist/*.zip - name: Upload build artifacts uses: actions/upload-artifact@v1 diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml index 80b5e7d63..682d618e9 100644 --- a/.github/workflows/basemap-for-windows.yml +++ b/.github/workflows/basemap-for-windows.yml @@ -61,22 +61,22 @@ jobs: name: checkout path: . - - name: Set Python - uses: actions/setup-python@v2 - with: - architecture: ${{ matrix.arch }} - python-version: "3.6" - - - name: Setup MSVC toolset + name: Set MSVC toolset uses: pylegacy/actions/setup-msvc@v1 with: architecture: ${{ matrix.arch }} version: ${{ matrix.msvc-toolset }} - - name: Install CMake + name: Set CMake uses: jwlawson/actions-setup-cmake@v1.9 with: cmake-version: ${{ matrix.cmake-version }} + - + name: Set Python + uses: actions/setup-python@v2 + with: + architecture: ${{ matrix.arch }} + python-version: "3.6" - name: Build GEOS from source run: | @@ -107,12 +107,6 @@ jobs: with: name: checkout path: . - - - name: Set Python - uses: actions/setup-python@v2 - with: - architecture: ${{ matrix.arch }} - python-version: ${{ matrix.python-version }} - name: Set MSVC toolset version run: | @@ -122,38 +116,31 @@ jobs: echo "msvc-toolset=14.16" >> $env:GITHUB_ENV } - - name: Setup MSVC toolset + name: Set MSVC toolset uses: pylegacy/actions/setup-msvc@v1 with: architecture: ${{ matrix.arch }} version: ${{ env.msvc-toolset }} - - name: Install Python base packages + name: Set Python + uses: actions/setup-python@v2 + with: + architecture: ${{ matrix.arch }} + python-version: ${{ matrix.python-version }} + - + name: Set Python base packages run: | python -m pip install --upgrade pip setuptools wheel - - name: Generate NumPy headers + name: Build old numpy from source run: | - if ("${{ matrix.python-version }}" -In "2.6", "3.2", "3.3") { - Set-Variable -Name "pkgvers" -Value "1.11.3" - } elseif ("${{ matrix.python-version }}" -In "2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9") { - Set-Variable -Name "pkgvers" -Value "1.16.6" - } else { - Set-Variable -Name "pkgvers" -Value "1.21.4" + 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" } } - Set-Variable -Name "pkgname" -Value "numpy" - Set-Variable -Name "pkgcode" -Value "numpy-${pkgvers}" - Set-Variable -Name "includedir" -Value "numpy/core/include" - python -m pip install cython - python -m pip download --no-binary=numpy "numpy == ${pkgvers}" - tar -xf "${pkgcode}.zip" - rm "${pkgcode}.zip" - cd "${pkgcode}" - python setup.py build - cp -R build/src.*/${includedir}/numpy/*.h ${includedir}/numpy - cd .. - cp -R "${pkgcode}/${includedir}/numpy" "${{ env.PKGDIR }}/extern/include/numpy" - rm -r "${pkgcode}" + $env:SETUPTOOLS_USE_DISTUTILS = "stdlib" + python -m pip install "numpy == ${pkgvers}" - name: Download GEOS artifacts uses: actions/download-artifact@v1 @@ -161,13 +148,13 @@ jobs: name: artifacts-geos-${{ matrix.arch }}-msvc${{ env.msvc-toolset }} path: ${{ env.PKGDIR }}/extern - - name: Build wheel + name: Build sdist and wheel run: | cd ${{ env.PKGDIR }} - $env:GEOS_DIR = "extern" - $env:NUMPY_INCLUDE_PATH = "extern/include" + $env:GEOS_DIR = "$env:GITHUB_WORKSPACE/${{ env.PKGDIR }}/extern" pip install -r requirements-setup.txt - python setup.py sdist bdist_wheel + python setup.py sdist + pip wheel -w dist --no-deps (Get-Item dist/*.zip) - name: Upload build artifacts uses: actions/upload-artifact@v1 @@ -187,12 +174,6 @@ jobs: needs: build runs-on: windows-latest steps: - - - name: Download checkout - uses: actions/download-artifact@v1 - with: - name: checkout - path: . - name: Set Python uses: actions/setup-python@v2 diff --git a/.gitignore b/.gitignore index c8d741a00..e67dd9643 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,17 @@ +.eggs build dist -.eggs *.egg-info *.pyc *.pyd *.so -*.c - -doc/build -doc/source/_autosummary htmlcov +.cache .coverage .pytest_cache +# File manager files. .gdb_history .DS_Store .DS_Store? @@ -21,19 +19,22 @@ ehthumbs.db Icon? Thumbs.db +# Temporary files. .#* [#]*# *~ *$ *.bak + +# IDE files. .project .pydevproject .vscode # Things specific to this project. -examples/*.png *.pickle -doc/examples -doc/_templates/gallery.html -doc/users/installing.rst -doc/_static/matplotlibrc +examples/*.png +packages/basemap/doc/examples +packages/basemap/doc/users/installing.rst +packages/basemap/doc/_static/matplotlibrc +packages/basemap/doc/_templates/gallery.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 362b8be7a..68b00e7f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,43 @@ is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) since version 1.3.0. +## [1.3.2] - 2022-02-10 + +### Added +- Add `"/usr/lib/x86_64-linux-gnu"` to list of candidate locations to + search the GEOS library during installation. + +### Changed +- Split lint and test requirements into two separate files. + +### Fixed +- Fix setup encoding comment to deal with corner case under PowerShell. +- Enforce dependency `numpy >= 1.21` for Python >= 3.7 due to `numpy` + vulnerability [CVE-2021-33430]. +- Fix wrong marker for `unittest2` in development requirements. +- Fix `sdist` so that packages can be built from source distributions + (PR [#532] by @DWesl). +- Specify Cython language level for `_geoslib` extension explicitly. +- Enforce up-to-date `pillow` dependency when possible: + - `pillow >= 9.0.0` for Python >= 3.7 due to `pillow` vulnerabilities + [CVE-2022-22815], [CVE-2022-22816] and [CVE-2022-22817]. + - `pillow >= 8.3.2` for Python >= 3.6 due to `pillow` vulnerabilities + [CVE-2020-35653], [CVE-2020-35654], [CVE-2020-35655], + [CVE-2021-23437], [CVE-2021-25287], [CVE-2021-25288], + [CVE-2021-25290], [CVE-2021-25291], [CVE-2021-25292], + [CVE-2021-25293], [CVE-2021-27921], [CVE-2021-27922], + [CVE-2021-27923], [CVE-2021-28675], [CVE-2021-28676], + [CVE-2021-28677], [CVE-2021-28678] and [CVE-2021-34552]. + - `pillow >= 7.1.0` for Python >= 3.5 due to `pillow` vulnerabilities + [CVE-2020-10177], [CVE-2020-10378], [CVE-2020-10379], + [CVE-2020-10994] and [CVE-2020-11538]. + - `pillow >= 6.2.2` For Python == 2.7 due to `pillow` vulnerabilities + [CVE-2019-16865], [CVE-2019-19911], [CVE-2020-5310], [CVE-2020-5312] + and [CVE-2020-5313]. + +### Removed +- Remove deprecation notices (issue [#527]). + ## [1.3.1] - 2022-01-22 ### Added @@ -37,8 +74,8 @@ since version 1.3.0. This change together with the precompiled binary wheels in PyPI should solve most of the former installation problems (see issues [#403], [#405], [#422], - [#436], [#445], [#456], [#461], [#488], [#489], [#491], [#510], [#525] and - [#526]). + [#436], [#445], [#456], [#461], [#488], [#489], [#491], [#510], [#513], + [#525] and [#526]). - Upgrade default GEOS library dependency to 3.5.1. - Update and clarify licenses. In summary: - `basemap`: MIT license. @@ -845,10 +882,14 @@ since version 1.3.0. - Fix glitches in drawing of parallels and meridians. +[#532]: +https://github.com/matplotlib/basemap/pull/532 [#531]: https://github.com/matplotlib/basemap/issues/531 [#530]: https://github.com/matplotlib/basemap/issues/530 +[#527]: +https://github.com/matplotlib/basemap/issues/527 [#526]: https://github.com/matplotlib/basemap/issues/526 [#525]: @@ -857,6 +898,8 @@ https://github.com/matplotlib/basemap/issues/525 https://github.com/matplotlib/basemap/issues/521 [#518]: https://github.com/matplotlib/basemap/issues/518 +[#513]: +https://github.com/matplotlib/basemap/issues/513 [#510]: https://github.com/matplotlib/basemap/issues/510 [#505]: @@ -895,7 +938,9 @@ https://github.com/matplotlib/basemap/issues/228 https://github.com/matplotlib/basemap/issues/179 [Unreleased]: -https://github.com/matplotlib/basemap/compare/v1.3.1...develop +https://github.com/matplotlib/basemap/compare/v1.3.2...develop +[1.3.2]: +https://github.com/matplotlib/basemap/compare/v1.3.1...v1.3.2 [1.3.1]: https://github.com/matplotlib/basemap/compare/v1.3.0...v1.3.1 [1.3.0]: @@ -918,3 +963,68 @@ https://github.com/matplotlib/basemap/compare/v1.0.4rel...v1.0.5rel https://github.com/matplotlib/basemap/compare/v1.0.3rel...v1.0.4rel [1.0.3]: https://github.com/matplotlib/basemap/tree/v1.0.3rel + +[CVE-2022-22817]: +https://nvd.nist.gov/vuln/detail/CVE-2022-22817 +[CVE-2022-22816]: +https://nvd.nist.gov/vuln/detail/CVE-2022-22816 +[CVE-2022-22815]: +https://nvd.nist.gov/vuln/detail/CVE-2022-22815 +[CVE-2021-34552]: +https://nvd.nist.gov/vuln/detail/CVE-2021-34552 +[CVE-2021-33430]: +https://nvd.nist.gov/vuln/detail/CVE-2021-33430 +[CVE-2021-28678]: +https://nvd.nist.gov/vuln/detail/CVE-2021-28678 +[CVE-2021-28677]: +https://nvd.nist.gov/vuln/detail/CVE-2021-28677 +[CVE-2021-28676]: +https://nvd.nist.gov/vuln/detail/CVE-2021-28676 +[CVE-2021-28675]: +https://nvd.nist.gov/vuln/detail/CVE-2021-28675 +[CVE-2021-27923]: +https://nvd.nist.gov/vuln/detail/CVE-2021-27923 +[CVE-2021-27922]: +https://nvd.nist.gov/vuln/detail/CVE-2021-27922 +[CVE-2021-27921]: +https://nvd.nist.gov/vuln/detail/CVE-2021-27921 +[CVE-2021-25293]: +https://nvd.nist.gov/vuln/detail/CVE-2021-25293 +[CVE-2021-25292]: +https://nvd.nist.gov/vuln/detail/CVE-2021-25292 +[CVE-2021-25291]: +https://nvd.nist.gov/vuln/detail/CVE-2021-25291 +[CVE-2021-25290]: +https://nvd.nist.gov/vuln/detail/CVE-2021-25290 +[CVE-2021-25288]: +https://nvd.nist.gov/vuln/detail/CVE-2021-25288 +[CVE-2021-25287]: +https://nvd.nist.gov/vuln/detail/CVE-2021-25287 +[CVE-2021-23437]: +https://nvd.nist.gov/vuln/detail/CVE-2021-23437 +[CVE-2020-35655]: +https://nvd.nist.gov/vuln/detail/CVE-2020-35655 +[CVE-2020-35654]: +https://nvd.nist.gov/vuln/detail/CVE-2020-35654 +[CVE-2020-35653]: +https://nvd.nist.gov/vuln/detail/CVE-2020-35653 +[CVE-2020-11538]: +https://nvd.nist.gov/vuln/detail/CVE-2020-11538 +[CVE-2020-10994]: +https://nvd.nist.gov/vuln/detail/CVE-2020-10994 +[CVE-2020-10379]: +https://nvd.nist.gov/vuln/detail/CVE-2020-10379 +[CVE-2020-10378]: +https://nvd.nist.gov/vuln/detail/CVE-2020-10378 +[CVE-2020-10177]: +https://nvd.nist.gov/vuln/detail/CVE-2020-10177 +[CVE-2020-5313]: +https://nvd.nist.gov/vuln/detail/CVE-2020-5313 +[CVE-2020-5312]: +https://nvd.nist.gov/vuln/detail/CVE-2020-5312 +[CVE-2020-5310]: +https://nvd.nist.gov/vuln/detail/CVE-2020-5310 +[CVE-2019-19911]: +https://nvd.nist.gov/vuln/detail/CVE-2019-19911 +[CVE-2019-16865]: +https://nvd.nist.gov/vuln/detail/CVE-2019-16865 diff --git a/README.md b/README.md index ec1f650c2..bfc3b425b 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,6 @@ Plot on map projections (with coastlines and political boundaries) using matplotlib. -:warning: **Warning**: this package is being deprecated in favour of -[cartopy](https://scitools.org.uk/cartopy/docs/latest/). - ## Requirements Basic requirements are the following: diff --git a/packages/basemap/.pylintrc b/packages/basemap/.pylintrc index bc128d407..4f77bbd52 100644 --- a/packages/basemap/.pylintrc +++ b/packages/basemap/.pylintrc @@ -15,7 +15,7 @@ ignore-patterns= # Python code to execute, usually for sys.path manipulation such as # pygtk.require(). -init-hook="import sys; sys.setrecursionlimit(8 * sys.getrecursionlimit())" +init-hook="import sys; sys.path.insert(0, 'src'); sys.setrecursionlimit(8 * sys.getrecursionlimit())" # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the # number of processors available to use. @@ -60,16 +60,24 @@ confidence= # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". -disable=assignment-from-no-return, - undefined-all-variable, - global-statement, - global-variable-not-assigned, - global-variable-undefined, - import-outside-toplevel, - useless-object-inheritance, - super-with-arguments, - raise-missing-from, - consider-using-f-string +disable= + # Allow freedom with imports. + import-outside-toplevel, + # Allow freedom with globals. + global-statement, + global-variable-not-assigned, + global-variable-undefined, + undefined-all-variable, + # Allow freedom with inheritance. + useless-object-inheritance, + super-with-arguments, + # Allow assigning to returned None. + assignment-from-no-return, + assignment-from-none, + # Allow freedom with error raises. + raise-missing-from, + # Allow freedom with string formatting. + consider-using-f-string # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option @@ -199,7 +207,7 @@ method-naming-style=snake_case # Regular expression matching correct module names. Overrides module-naming- # style. -module-rgx=^(test_)?((?P_?[a-z][a-z0-9_]{1,29})|(?P_?[A-Z][a-zA-Z0-9]{1,29}))$ +module-rgx=^(test_)?((?P_{0,2}[a-z][a-z0-9_]{1,29}_{0,2})|(?P_?[A-Z][a-zA-Z0-9]{1,29}_{0,2}))$ # Colon-delimited sets of names that determine each other's naming style when # the name regexes allow several styles. @@ -289,7 +297,7 @@ ignore-docstrings=yes ignore-imports=no # Minimum lines number of a similarity. -min-similarity-lines=12 +min-similarity-lines=16 [SPELLING] @@ -456,7 +464,7 @@ max-locals=24 max-parents=18 # Maximum number of public methods for a class (see R0904). -max-public-methods=24 +max-public-methods=90 # Maximum number of return / yield for function / method body. max-returns=6 diff --git a/packages/basemap/MANIFEST.in b/packages/basemap/MANIFEST.in new file mode 100644 index 000000000..0ea74f384 --- /dev/null +++ b/packages/basemap/MANIFEST.in @@ -0,0 +1,8 @@ +include requirements*.txt +recursive-include doc * +recursive-exclude doc/build * +recursive-include test * +recursive-include utils *.py +recursive-exclude **/__pycache__ * +exclude **/*.pyc +exclude **/.gitkeep diff --git a/packages/basemap/README.md b/packages/basemap/README.md index 849836c85..37379d4fd 100644 --- a/packages/basemap/README.md +++ b/packages/basemap/README.md @@ -45,6 +45,6 @@ https://spdx.org/licenses/LGPL-2.1-only.html https://spdx.org/licenses/MIT.html [`LICENSE`]: -https://github.com/matplotlib/basemap/blob/v1.3.1/packages/basemap/LICENSE +https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap/LICENSE [`LICENSE.geos`]: -https://github.com/matplotlib/basemap/blob/v1.3.1/packages/basemap/LICENSE.geos +https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap/LICENSE.geos diff --git a/packages/basemap/doc/index.rst b/packages/basemap/doc/index.rst index 23bdf319b..65f6b2c3c 100644 --- a/packages/basemap/doc/index.rst +++ b/packages/basemap/doc/index.rst @@ -13,11 +13,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - -Deprecation Notice -================== - -Basemap is deprecated in favor of the -`Cartopy project `_. -See notes in :ref:`deprecation_notice` for more details. - diff --git a/packages/basemap/doc/users/intro.rst b/packages/basemap/doc/users/intro.rst index cbec1fb6d..46965fcf3 100644 --- a/packages/basemap/doc/users/intro.rst +++ b/packages/basemap/doc/users/intro.rst @@ -29,24 +29,3 @@ the only other tool in python for plotting data on map projections. Over the years, the capabilities of Basemap have evolved as scientists in other disciplines (such as biology, geology and geophysics) requested and contributed new features. - -.. _deprecation_notice: - -Cartopy, New Management, and EoL Announcement -============================================= - -Starting in 2016, Basemap came under new management. The -`Cartopy project `_ will replace -Basemap, but it hasn't yet implemented all of Basemap's features. -All new software development should try to use Cartopy whenever possible, -and existing software should start the process of switching over to use -Cartopy. All maintenance and development efforts should be focused on -Cartopy. - -Ben Root has volunteered to take over maintenance of Basemap until 2020. -Pull requests will be reviewed, and regressions will be fixed. Also, this -maintenance will ensure compatibility with packages like NumPy and Matplotlib. -New features will be accepted, but we stress that new development efforts -should be focused on Cartopy. When Python 2.7 is officially EoL'ed in 2020, -a release of Basemap will be made and support from Ben Root will end. - diff --git a/packages/basemap/pyproject.toml b/packages/basemap/pyproject.toml new file mode 100644 index 000000000..74777ad04 --- /dev/null +++ b/packages/basemap/pyproject.toml @@ -0,0 +1,11 @@ +[build-system] +requires = [ + 'setuptools', + 'wheel', + 'numpy == 1.21.4; python_version >= "3.10"', + 'numpy == 1.16.6; python_version == "2.7" or (python_version >= "3.4" and python_version <= "3.9")', + 'numpy == 1.11.3; python_version == "2.6" or (python_version >= "3.2" and python_version <= "3.3")', + 'cython >= 0.29, < 3.1; python_version >= "3.3" or python_version < "3.0"', + 'cython >= 0.26, < 0.27; python_version == "3.2"' +] +build-backend = "setuptools.build_meta" diff --git a/packages/basemap/requirements-dev.txt b/packages/basemap/requirements-dev.txt deleted file mode 100644 index cd160ceae..000000000 --- a/packages/basemap/requirements-dev.txt +++ /dev/null @@ -1,40 +0,0 @@ -flake8 >= 2.6, < 3.0; python_version == "2.6" -flake8 >= 2.6, < 4.0; python_version == "2.7" -flake8 >= 2.6, < 3.0; python_version == "3.2" -flake8 >= 2.6, < 3.0; python_version == "3.3" -flake8 >= 2.6, < 3.9; python_version == "3.4" -flake8 >= 2.6, < 4.1; python_version >= "3.5" - -astroid >= 1.6, < 2.0; python_version == "2.7" -astroid >= 2.4, < 3.0; python_version >= "3.5" -pylint >= 1.9, < 2.0; python_version == "2.7" -pylint >= 2.6, < 3.0; python_version >= "3.5" - -unittest2; python_version >= "3.10" - -pytest >= 3.2, < 3.3; python_version == "2.6" -pytest >= 3.2, < 5.0; python_version == "2.7" -pytest >= 2.9, < 3.0; python_version == "3.2" -pytest >= 3.2, < 3.3; python_version == "3.3" -pytest >= 3.2, < 5.0; python_version == "3.4" -pytest >= 3.2, < 6.3; python_version == "3.5" -pytest >= 6.2.5, < 6.3; python_version >= "3.6" - -coverage >= 3.7, < 4.0; python_version == "3.2" -pytest-cov >= 2.5, < 2.6; python_version == "2.6" -pytest-cov >= 2.5, < 3.0; python_version == "2.7" -pytest-cov >= 2.5, < 2.6; python_version == "3.2" -pytest-cov >= 2.5, < 2.6; python_version == "3.3" -pytest-cov >= 2.5, < 2.9; python_version == "3.4" -pytest-cov >= 2.5, < 3.1; python_version >= "3.5" - -ordereddict; python_version == "2.6" -netCDF4 >= 1.3, < 1.4; python_version < "3.6" -netCDF4 >= 1.3, < 1.5.6; python_version >= "3.6" - -pillow >= 3.4, < 4.0; python_version == "2.6" -pillow >= 6.2, < 7.0; python_version == "2.7" -pillow >= 3.4, < 4.0; python_version == "3.2" -pillow >= 4.3, < 5.0; python_version == "3.3" -pillow >= 5.4, < 6.0; python_version == "3.4" -pillow >= 6.2, < 8.5; python_version >= "3.5" diff --git a/packages/basemap/requirements-lint.txt b/packages/basemap/requirements-lint.txt new file mode 100644 index 000000000..b5cdc5230 --- /dev/null +++ b/packages/basemap/requirements-lint.txt @@ -0,0 +1,13 @@ +unittest2; python_version <= "3.9" + +flake8 >= 2.6, < 3.0; python_version == "2.6" +flake8 >= 2.6, < 4.0; python_version == "2.7" +flake8 >= 2.6, < 3.0; python_version == "3.2" +flake8 >= 2.6, < 3.0; python_version == "3.3" +flake8 >= 2.6, < 3.9; python_version == "3.4" +flake8 >= 2.6, < 4.1; python_version >= "3.5" + +astroid >= 1.6, < 2.0; python_version == "2.7" +astroid >= 2.4, < 3.0; python_version >= "3.5" +pylint >= 1.9, < 2.0; python_version == "2.7" +pylint >= 2.6, < 3.0; python_version >= "3.5" diff --git a/packages/basemap/requirements-test.txt b/packages/basemap/requirements-test.txt new file mode 100644 index 000000000..1033dade4 --- /dev/null +++ b/packages/basemap/requirements-test.txt @@ -0,0 +1,31 @@ +unittest2; python_version <= "3.9" + +typing >= 3.5, < 3.11; python_version == "3.4" +pytest >= 3.2, < 3.3; python_version == "2.6" +pytest >= 3.2, < 5.0; python_version == "2.7" +pytest >= 2.9, < 3.0; python_version == "3.2" +pytest >= 3.2, < 3.3; python_version == "3.3" +pytest >= 3.2, < 5.0; python_version == "3.4" +pytest >= 3.2, < 6.2; python_version == "3.5" +pytest >= 6.2.5, < 6.3; python_version >= "3.6" + +coverage >= 3.7, < 4.0; python_version == "3.2" +pytest-cov >= 2.5, < 2.6; python_version == "2.6" +pytest-cov >= 2.5, < 3.0; python_version == "2.7" +pytest-cov >= 2.5, < 2.6; python_version == "3.2" +pytest-cov >= 2.5, < 2.6; python_version == "3.3" +pytest-cov >= 2.5, < 2.9; python_version == "3.4" +pytest-cov >= 2.5, < 3.1; python_version >= "3.5" + +ordereddict; python_version == "2.6" +netCDF4 >= 1.3, < 1.4; python_version < "3.6" +netCDF4 >= 1.3, < 1.5.6; python_version >= "3.6" + +pillow >= 3.4.0, < 4.0.0; python_version == "2.6" +pillow >= 6.2.2, < 7.0.0; python_version == "2.7" +pillow >= 3.4.0, < 4.0.0; python_version == "3.2" +pillow >= 4.3.0, < 5.0.0; python_version == "3.3" +pillow >= 5.4.0, < 6.0.0; python_version == "3.4" +pillow >= 7.1.0, < 8.0.0; python_version == "3.5" +pillow >= 8.3.2, < 9.0.0; python_version == "3.6" +pillow >= 9.0.0, < 10.0.0; python_version >= "3.7" diff --git a/packages/basemap/requirements.txt b/packages/basemap/requirements.txt index c54718351..9f17a0d9b 100644 --- a/packages/basemap/requirements.txt +++ b/packages/basemap/requirements.txt @@ -6,13 +6,10 @@ numpy >= 1.11, < 1.12; python_version == "2.6" numpy >= 1.16, < 1.17; python_version == "2.7" numpy >= 1.11, < 1.12; python_version == "3.2" numpy >= 1.11, < 1.12; python_version == "3.3" -numpy >= 1.11, < 1.17; python_version == "3.4" +numpy >= 1.15, < 1.17; python_version == "3.4" numpy >= 1.16, < 1.19; python_version == "3.5" numpy >= 1.16, < 1.20; python_version == "3.6" -numpy >= 1.19, < 1.22; python_version == "3.7" -numpy >= 1.19, < 1.23; python_version == "3.8" -numpy >= 1.19, < 1.23; python_version == "3.9" -numpy >= 1.21, < 1.23; python_version >= "3.10" +numpy >= 1.21, < 1.23; python_version >= "3.7" cycler < 0.11; python_version == "3.2" pyparsing >= 1.5, < 2.4.1; python_version == "2.6" diff --git a/packages/basemap/setup.cfg b/packages/basemap/setup.cfg index 5960a8691..3195b621d 100644 --- a/packages/basemap/setup.cfg +++ b/packages/basemap/setup.cfg @@ -1,3 +1,11 @@ +[metadata] +license_files = + LICENSE + LICENSE.geos + +[sdist] +formats = zip + [flake8] ignore = E301,E306,E402,E501,E731,W503,W504 diff --git a/packages/basemap/setup.py b/packages/basemap/setup.py index c4b6f4697..50ac4c2e0 100644 --- a/packages/basemap/setup.py +++ b/packages/basemap/setup.py @@ -1,5 +1,5 @@ #! /usr/bin/env python -# -*- coding: utf8 -*- +# -*- coding: utf-8 -*- # flake8: noqa: E122 """basemap -- Plot data on map projections with matplotlib.""" @@ -20,7 +20,7 @@ def get_content(name, splitlines=False): here = os.path.abspath(os.path.dirname(__file__)) path = os.path.join(here, name) - with io.open(path, encoding="utf-8") as fd: + with io.open(path, "r", encoding="utf-8") as fd: content = fd.read() if splitlines: content = [row for row in content.splitlines() if row] @@ -35,11 +35,11 @@ def get_geos_install_prefix(): candidates = [env_candidate] else: candidates = [os.path.expanduser("~/local"), os.path.expanduser("~"), - "/usr/local", "/usr", "/opt/local", "/opt", "/sw"] + "/usr/local", "/usr", "/opt/local", "/opt", "/sw"] for prefix in candidates: libfiles = [] - libdirs = ["bin", "lib", "lib64"] + libdirs = ["bin", "lib", "lib/x86_64-linux-gnu", "lib64"] libext = "dll" if os.name == "nt" else "so" libcode = "{0}geos_c".format("" if os.name == "nt" else "lib") libname = "{0}*.{1}*".format(libcode, libext) @@ -78,15 +78,6 @@ def run(self): finally: self.distribution.data_files = orig_data_files - def initialize_options(self): - """Call `initialize_options` and then set zip as default format.""" - - sdist.initialize_options(self) - self._default_to_zip() - - def _default_to_zip(self): - self.formats = ["zip"] - # Initialise include and library dirs. data_files = [] @@ -144,33 +135,36 @@ def _default_to_zip(self): runtime_library_dirs, }), ] +for ext in ext_modules: + ext.cython_directives = [ + ("language_level", str(sys.version_info[0])), + ] # Define all the different requirements. -dev_requires = get_content("requirements-dev.txt", splitlines=True) -doc_requires = get_content("requirements-doc.txt", splitlines=True) setup_requires = get_content("requirements-setup.txt", splitlines=True) install_requires = get_content("requirements.txt", splitlines=True) if sys.version_info[:2] == (3, 2): # Hack for Python 3.2 because pip < 8 cannot handle version markers. - marker = '; python_version == "3.2"' - dev_requires = [ - item.replace(marker, "") for item in dev_requires - if item.endswith(marker) or "python_version" not in item] - doc_requires = [ - item.replace(marker, "") for item in doc_requires - if item.endswith(marker) or "python_version" not in item] + marker1 = '; python_version == "3.2"' + marker2 = '; python_version >= "2.7"' setup_requires = [ - item.replace(marker, "") for item in setup_requires - if item.endswith(marker) or "python_version" not in item] + item.replace(marker1, "").replace(marker2, "") for item in setup_requires + if item.endswith(marker1) or item.endswith(marker2) + or "python_version" not in item] install_requires = [ - item.replace(marker, "") for item in install_requires - if item.endswith(marker) or "python_version" not in item] + item.replace(marker1, "").replace(marker2, "") for item in install_requires + if item.endswith(marker1) or item.endswith(marker2) + or "python_version" not in item] +else: + marker1 = '; python_version == "3.2"' + setup_requires = [item for item in setup_requires if not item.endswith(marker1)] + install_requires = [item for item in install_requires if not item.endswith(marker1)] setup(**{ "name": "basemap", "version": - "1.3.1", + "1.3.2", "license": "MIT", "description": @@ -228,10 +222,12 @@ def _default_to_zip(self): "install_requires": install_requires, "extras_require": { - "dev": - dev_requires, "doc": - doc_requires, + get_content("requirements-doc.txt", splitlines=True), + "lint": + get_content("requirements-lint.txt", splitlines=True), + "test": + get_content("requirements-test.txt", splitlines=True), }, "cmdclass": { "sdist": basemap_sdist, diff --git a/packages/basemap/src/mpl_toolkits/basemap/__init__.py b/packages/basemap/src/mpl_toolkits/basemap/__init__.py index af999757e..19efa463f 100644 --- a/packages/basemap/src/mpl_toolkits/basemap/__init__.py +++ b/packages/basemap/src/mpl_toolkits/basemap/__init__.py @@ -64,7 +64,7 @@ from mpl_toolkits import basemap_data basemap_datadir = os.path.abspath(list(basemap_data.__path__)[0]) -__version__ = "1.3.1" +__version__ = "1.3.2" # module variable that sets the default value for the 'latlon' kwarg. # can be set to True by user so plotting functions can take lons,lats diff --git a/packages/basemap/src/mpl_toolkits/basemap/proj.py b/packages/basemap/src/mpl_toolkits/basemap/proj.py index dc2c62abf..fcc42249d 100644 --- a/packages/basemap/src/mpl_toolkits/basemap/proj.py +++ b/packages/basemap/src/mpl_toolkits/basemap/proj.py @@ -10,7 +10,7 @@ # as textwrap.dedent. from matplotlib.cbook import dedent -__version__ = "1.3.1" +__version__ = "1.3.2" _dg2rad = math.radians(1.) _rad2dg = math.degrees(1.) diff --git a/packages/basemap/utils/GeosLibrary.py b/packages/basemap/utils/GeosLibrary.py index c38c2049c..ffbcfd1f4 100644 --- a/packages/basemap/utils/GeosLibrary.py +++ b/packages/basemap/utils/GeosLibrary.py @@ -1,5 +1,5 @@ #! /usr/bin/env python -# -*- coding: utf8 -*- +# -*- coding: utf-8 -*- # # Copyright (c) 2021 Víctor Molina García diff --git a/packages/basemap_data/README.md b/packages/basemap_data/README.md index ba6800b41..e7efd2002 100644 --- a/packages/basemap_data/README.md +++ b/packages/basemap_data/README.md @@ -43,10 +43,10 @@ https://spdx.org/licenses/LGPL-3.0-or-later.html https://spdx.org/licenses/MIT.html [`COPYING`]: -https://github.com/matplotlib/basemap/blob/v1.3.0/packages/basemap_data/COPYING +https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/COPYING [`COPYING.LESSER`]: -https://github.com/matplotlib/basemap/blob/v1.3.0/packages/basemap_data/COPYING.LESSER +https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/COPYING.LESSER [`LICENSE.epsg`]: -https://github.com/matplotlib/basemap/blob/v1.3.0/packages/basemap_data/LICENSE.epsg +https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/LICENSE.epsg [`LICENSE.mit`]: -https://github.com/matplotlib/basemap/blob/v1.3.0/packages/basemap_data/LICENSE.mit +https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/LICENSE.mit diff --git a/packages/basemap_data/setup.cfg b/packages/basemap_data/setup.cfg new file mode 100644 index 000000000..46fc44d00 --- /dev/null +++ b/packages/basemap_data/setup.cfg @@ -0,0 +1,12 @@ +[metadata] +license_files = + COPYING + COPYING.LESSER + LICENSE.epsg + LICENSE.mit + +[sdist] +formats = zip + +[bdist_wheel] +universal = 1 diff --git a/packages/basemap_data/setup.py b/packages/basemap_data/setup.py index 4674b6003..2d8e4e620 100644 --- a/packages/basemap_data/setup.py +++ b/packages/basemap_data/setup.py @@ -1,5 +1,5 @@ #! /usr/bin/env python -# -*- coding: utf8 -*- +# -*- coding: utf-8 -*- # flake8: noqa: E122 """basemap_data -- Data assets for matplotlib basemap.""" @@ -8,7 +8,6 @@ import itertools from setuptools import setup from setuptools import find_packages -from setuptools.command.sdist import sdist def get_content(name, splitlines=False): @@ -16,26 +15,13 @@ def get_content(name, splitlines=False): here = os.path.abspath(os.path.dirname(__file__)) path = os.path.join(here, name) - with io.open(path, encoding="utf-8") as fd: + with io.open(path, "r", encoding="utf-8") as fd: content = fd.read() if splitlines: content = [row for row in content.splitlines() if row] return content -class basemap_data_sdist(sdist): - """Custom `sdist` so that it will force to save in zip format.""" - - def initialize_options(self): - """Call `initialize_options` and then set zip as default format.""" - - sdist.initialize_options(self) - self._default_to_zip() - - def _default_to_zip(self): - self.formats = ["zip"] - - # Define some helper lists. basenames = [ "countries", @@ -87,7 +73,7 @@ def _default_to_zip(self): "name": "basemap_data", "version": - "1.3.0", + "1.3.2", "license": "GNU Lesser General Public License v3 or later (LGPLv3+)", "description": @@ -140,9 +126,6 @@ def _default_to_zip(self): "!=3.1.*", "<4", ]), - "cmdclass": { - "sdist": basemap_data_sdist, - }, "project_urls": { "Bug Tracker": "https://github.com/matplotlib/basemap/issues", diff --git a/packages/basemap_data_hires/README.md b/packages/basemap_data_hires/README.md index 9600e0a21..6edbca740 100644 --- a/packages/basemap_data_hires/README.md +++ b/packages/basemap_data_hires/README.md @@ -36,6 +36,6 @@ https://www.generic-mapping-tools.org/ [LGPLv3+]: https://spdx.org/licenses/LGPL-3.0-or-later.html [`COPYING`]: -https://github.com/matplotlib/basemap/blob/v1.3.0/packages/basemap_data_hires/COPYING +https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data_hires/COPYING [`COPYING.LESSER`]: -https://github.com/matplotlib/basemap/blob/v1.3.0/packages/basemap_data_hires/COPYING.LESSER +https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data_hires/COPYING.LESSER diff --git a/packages/basemap_data_hires/setup.cfg b/packages/basemap_data_hires/setup.cfg new file mode 100644 index 000000000..e408a4da9 --- /dev/null +++ b/packages/basemap_data_hires/setup.cfg @@ -0,0 +1,10 @@ +[metadata] +license_files = + COPYING + COPYING.LESSER + +[sdist] +formats = zip + +[bdist_wheel] +universal = 1 diff --git a/packages/basemap_data_hires/setup.py b/packages/basemap_data_hires/setup.py index 72f035c41..7dbe83cf6 100644 --- a/packages/basemap_data_hires/setup.py +++ b/packages/basemap_data_hires/setup.py @@ -1,5 +1,5 @@ #! /usr/bin/env python -# -*- coding: utf8 -*- +# -*- coding: utf-8 -*- # flake8: noqa: E122 """basemap_data_hires -- High-resolution data assets for matplotlib basemap.""" @@ -8,7 +8,6 @@ import itertools from setuptools import setup from setuptools import find_packages -from setuptools.command.sdist import sdist def get_content(name, splitlines=False): @@ -16,26 +15,13 @@ def get_content(name, splitlines=False): here = os.path.abspath(os.path.dirname(__file__)) path = os.path.join(here, name) - with io.open(path, encoding="utf-8") as fd: + with io.open(path, "r", encoding="utf-8") as fd: content = fd.read() if splitlines: content = [row for row in content.splitlines() if row] return content -class basemap_data_hires_sdist(sdist): - """Custom `sdist` so that it will force to save in zip format.""" - - def initialize_options(self): - """Call `initialize_options` and then set zip as default format.""" - - sdist.initialize_options(self) - self._default_to_zip() - - def _default_to_zip(self): - self.formats = ["zip"] - - # Define some helper lists. basenames = [ "countries", @@ -65,7 +51,7 @@ def _default_to_zip(self): "name": "basemap_data_hires", "version": - "1.3.0", + "1.3.2", "license": "GNU Lesser General Public License v3 or later (LGPLv3+)", "description": @@ -118,9 +104,6 @@ def _default_to_zip(self): "!=3.1.*", "<4", ]), - "cmdclass": { - "sdist": basemap_data_hires_sdist, - }, "project_urls": { "Bug Tracker": "https://github.com/matplotlib/basemap/issues",