Skip to content

Commit

Permalink
DEP: Pin to shapely versions less than 2
Browse files Browse the repository at this point in the history
Shapely v2+ changes the C API access, so pin to earlier versions
until this is fixed.
  • Loading branch information
greglucas committed Sep 8, 2022
1 parent 9f1850e commit ad1ec1a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down Expand Up @@ -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.

Expand Down
7 changes: 5 additions & 2 deletions docs/source/whatsnew/v0.21.rst
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/SciTools/cartopy/milestone/30>`_.
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/default.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ad1ec1a

Please sign in to comment.