Skip to content

Commit ad1ec1a

Browse files
committed
DEP: Pin to shapely versions less than 2
Shapely v2+ changes the C API access, so pin to earlier versions until this is fixed.
1 parent 9f1850e commit ad1ec1a

File tree

7 files changed

+14
-11
lines changed

7 files changed

+14
-11
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ deps-run: &deps-install
4545
pyshp \
4646
scipy \
4747
setuptools_scm \
48-
shapely \
48+
'shapely<2' \
4949
$EXTRA_PACKAGES \
5050
--file docs/doc-requirements.txt
5151
conda list -n test-environment

.github/workflows/ci-testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Latest packages
3636
if: steps.minimum-packages.conclusion == 'skipped'
3737
run: |
38-
echo "PACKAGES=cython fiona matplotlib-base numpy pyproj pykdtree scipy shapely" >> $GITHUB_ENV
38+
echo "PACKAGES=cython fiona matplotlib-base numpy pyproj pykdtree scipy shapely<2" >> $GITHUB_ENV
3939
4040
- name: Coverage packages
4141
id: coverage
@@ -49,7 +49,7 @@ jobs:
4949
- name: Install dependencies
5050
run: |
5151
PACKAGES="$PACKAGES owslib pep8 pillow pyshp pytest pytest-mpl!=0.16.0"
52-
PACKAGES="$PACKAGES pytest-xdist setuptools_scm shapely"
52+
PACKAGES="$PACKAGES pytest-xdist setuptools_scm shapely<2"
5353
conda install $PACKAGES
5454
conda info -a
5555
conda list

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: |
2727
PACKAGES="cython fiona matplotlib-base numpy pyproj pykdtree scipy"
2828
PACKAGES="$PACKAGES owslib pep8 pillow pyshp pytest"
29-
PACKAGES="$PACKAGES pytest-xdist setuptools_scm shapely"
29+
PACKAGES="$PACKAGES pytest-xdist setuptools_scm shapely<2"
3030
conda install $PACKAGES
3131
3232
- name: Create sdist

INSTALL

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ For macOS, the required dependencies can be installed in the following way::
8585
pip3 install --upgrade pyshp
8686
# shapely needs to be built from source to link to geos. If it is already
8787
# installed, uninstall it by: pip3 uninstall shapely
88-
pip3 install shapely --no-binary shapely
88+
pip3 install "shapely<2" --no-binary shapely
8989

9090
Still on macOS, make sure you have installed pkg-config and set the
9191
`PKG_CONFIG_PATH` environment variable as follows::
@@ -117,7 +117,7 @@ Further information about the required dependencies can be found here:
117117
GEOS is an API of spatial predicates and functions for processing geometry
118118
written in C++.
119119

120-
**Shapely** 1.6.4 or later (https://github.com/Toblerity/Shapely)
120+
**Shapely** between 1.6.4 and 1.8.4 (https://github.com/Toblerity/Shapely)
121121
Python package for the manipulation and analysis of planar geometric
122122
objects.
123123

docs/source/whatsnew/v0.21.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
Version 0.21 (September XXX, 2022)
2-
==================================
1+
Version 0.21 (September 9, 2022)
2+
================================
3+
4+
Cartopy v0.21 is not compatible with Shapely 2.0, so this release
5+
has an upper pin on Shapely to avoid installing newer versions.
36

47
For a full list of included Pull Requests and closed Issues, please see the
58
`0.21 milestone <https://github.com/SciTools/cartopy/milestone/30>`_.

environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
# conda activate cartopy-dev
55
# pip install -e .
66
#
7-
name: cartopy-dev
7+
name: cartopy-dev2
88
channels:
99
- conda-forge
1010
dependencies:
1111
- cython>=0.28.5
1212
- numpy>=1.18
13-
- shapely>=1.6.4
13+
- shapely>=1.6.4,<2
1414
- geos>=3.7.2
1515
- pyshp>=2.1
1616
- pyproj>=3.0.0

requirements/default.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
numpy>=1.18
22
matplotlib>=3.1
3-
shapely>=1.6.4
3+
shapely>=1.6.4,<2
44
pyshp>=2.1
55
pyproj>=3.0.0

0 commit comments

Comments
 (0)