diff --git a/Shapely-issue1436-ef380ba-geos311.patch b/Shapely-issue1436-ef380ba-geos311.patch new file mode 100644 index 0000000..2c0768f --- /dev/null +++ b/Shapely-issue1436-ef380ba-geos311.patch @@ -0,0 +1,27 @@ +From ef380ba8796702a56e05138ed8599e89f617d2c9 Mon Sep 17 00:00:00 2001 +From: Joris Van den Bossche +Date: Sun, 10 Jul 2022 11:14:30 +0200 +Subject: [PATCH] update parallel offset test for GEOS 3.11 + +--- + tests/test_parallel_offset.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tests/test_parallel_offset.py b/tests/test_parallel_offset.py +index 7dbbe55cd..661291a55 100644 +--- a/tests/test_parallel_offset.py ++++ b/tests/test_parallel_offset.py +@@ -9,9 +9,11 @@ def test_parallel_offset_linestring(self): + left = line1.parallel_offset(5, 'left') + self.assertEqual(left, LineString([(0, 5), (10, 5)])) + right = line1.parallel_offset(5, 'right') +- self.assertEqual(right, LineString([(10, -5), (0, -5)])) ++ # using spatial equality because the order of coordinates is not guaranteed ++ # (GEOS 3.11 changed this, see https://github.com/shapely/shapely/issues/1436) ++ assert right.equals(LineString([(10, -5), (0, -5)])) + right = line1.parallel_offset(-5, 'left') +- self.assertEqual(right, LineString([(10, -5), (0, -5)])) ++ assert right.equals(LineString([(10, -5), (0, -5)])) + left = line1.parallel_offset(-5, 'right') + self.assertEqual(left, LineString([(0, 5), (10, 5)])) + diff --git a/python-Shapely.changes b/python-Shapely.changes index 9020a1d..fea4ab2 100644 --- a/python-Shapely.changes +++ b/python-Shapely.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 19 20:10:00 UTC 2022 - Ben Greiner + +- Add Shapely-issue1436-ef380ba-geos311.patch + * gh#shapely/shapely#1436 -- work around issue with geos 3.11.0 + ------------------------------------------------------------------- Mon Jun 20 10:48:47 UTC 2022 - Ben Greiner diff --git a/python-Shapely.spec b/python-Shapely.spec index 8eb5580..b259e1b 100644 --- a/python-Shapely.spec +++ b/python-Shapely.spec @@ -26,6 +26,8 @@ Summary: Geospatial geometries, predicates, and operations License: BSD-3-Clause URL: https://github.com/shapely/shapely Source: https://files.pythonhosted.org/packages/source/S/Shapely/Shapely-%{version}.tar.gz +# PATCH-FIX-UPSTREAM Shapely-issue1436-ef380ba-geos311.patch gh#shapely/shapely#1436 -- work around issue with geos 3.11.0 +Patch1: Shapely-issue1436-ef380ba-geos311.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel >= 3.6} BuildRequires: %{python_module numpy-devel}