From ad1ec1a4b901556a2111d6f87dbd09d9b4f920a2 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Thu, 8 Sep 2022 15:53:08 -0600 Subject: [PATCH] DEP: Pin to shapely versions less than 2 Shapely v2+ changes the C API access, so pin to earlier versions until this is fixed. --- .circleci/config.yml | 2 +- .github/workflows/ci-testing.yml | 4 ++-- .github/workflows/release.yml | 2 +- INSTALL | 4 ++-- docs/source/whatsnew/v0.21.rst | 7 +++++-- environment.yml | 4 ++-- requirements/default.txt | 2 +- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1c2fff434..476a13c84 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,7 +45,7 @@ deps-run: &deps-install pyshp \ scipy \ setuptools_scm \ - shapely \ + 'shapely<2' \ $EXTRA_PACKAGES \ --file docs/doc-requirements.txt conda list -n test-environment diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 54f987f6b..8ff698b72 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -35,7 +35,7 @@ jobs: - name: Latest packages if: steps.minimum-packages.conclusion == 'skipped' run: | - echo "PACKAGES=cython fiona matplotlib-base numpy pyproj pykdtree scipy shapely" >> $GITHUB_ENV + echo "PACKAGES=cython fiona matplotlib-base numpy pyproj pykdtree scipy shapely<2" >> $GITHUB_ENV - name: Coverage packages id: coverage @@ -49,7 +49,7 @@ jobs: - name: Install dependencies run: | PACKAGES="$PACKAGES owslib pep8 pillow pyshp pytest pytest-mpl!=0.16.0" - PACKAGES="$PACKAGES pytest-xdist setuptools_scm shapely" + PACKAGES="$PACKAGES pytest-xdist setuptools_scm shapely<2" conda install $PACKAGES conda info -a conda list diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32f4f87c7..5a4b0f594 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: run: | PACKAGES="cython fiona matplotlib-base numpy pyproj pykdtree scipy" PACKAGES="$PACKAGES owslib pep8 pillow pyshp pytest" - PACKAGES="$PACKAGES pytest-xdist setuptools_scm shapely" + PACKAGES="$PACKAGES pytest-xdist setuptools_scm shapely<2" conda install $PACKAGES - name: Create sdist diff --git a/INSTALL b/INSTALL index 4b6346d71..2562b4209 100644 --- a/INSTALL +++ b/INSTALL @@ -85,7 +85,7 @@ For macOS, the required dependencies can be installed in the following way:: pip3 install --upgrade pyshp # shapely needs to be built from source to link to geos. If it is already # installed, uninstall it by: pip3 uninstall shapely - pip3 install shapely --no-binary shapely + pip3 install "shapely<2" --no-binary shapely Still on macOS, make sure you have installed pkg-config and set the `PKG_CONFIG_PATH` environment variable as follows:: @@ -117,7 +117,7 @@ Further information about the required dependencies can be found here: GEOS is an API of spatial predicates and functions for processing geometry written in C++. -**Shapely** 1.6.4 or later (https://github.com/Toblerity/Shapely) +**Shapely** between 1.6.4 and 1.8.4 (https://github.com/Toblerity/Shapely) Python package for the manipulation and analysis of planar geometric objects. diff --git a/docs/source/whatsnew/v0.21.rst b/docs/source/whatsnew/v0.21.rst index 359c913ef..cb0a3c372 100644 --- a/docs/source/whatsnew/v0.21.rst +++ b/docs/source/whatsnew/v0.21.rst @@ -1,5 +1,8 @@ -Version 0.21 (September XXX, 2022) -================================== +Version 0.21 (September 9, 2022) +================================ + +Cartopy v0.21 is not compatible with Shapely 2.0, so this release +has an upper pin on Shapely to avoid installing newer versions. For a full list of included Pull Requests and closed Issues, please see the `0.21 milestone `_. diff --git a/environment.yml b/environment.yml index 2d5798a78..3490886f3 100644 --- a/environment.yml +++ b/environment.yml @@ -4,13 +4,13 @@ # conda activate cartopy-dev # pip install -e . # -name: cartopy-dev +name: cartopy-dev2 channels: - conda-forge dependencies: - cython>=0.28.5 - numpy>=1.18 - - shapely>=1.6.4 + - shapely>=1.6.4,<2 - geos>=3.7.2 - pyshp>=2.1 - pyproj>=3.0.0 diff --git a/requirements/default.txt b/requirements/default.txt index 861450c3c..45c3493cf 100644 --- a/requirements/default.txt +++ b/requirements/default.txt @@ -1,5 +1,5 @@ numpy>=1.18 matplotlib>=3.1 -shapely>=1.6.4 +shapely>=1.6.4,<2 pyshp>=2.1 pyproj>=3.0.0