diff --git a/fix-build-with-geos-3.8.0.patch b/fix-build-with-geos-3.8.0.patch new file mode 100644 index 0000000..2be6dd5 --- /dev/null +++ b/fix-build-with-geos-3.8.0.patch @@ -0,0 +1,24 @@ +From 21f8c1c47e648e25ddaaecacdcd029f22f648abd Mon Sep 17 00:00:00 2001 +From: Mike Taves +Date: Fri, 29 Nov 2019 13:04:01 +1300 +Subject: [PATCH] Change intersection test to check is_empty + +Related to new behaviour for POINT EMPTY with GEOS 3.8.0 +--- + tests/test_operations.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/tests/test_operations.py b/tests/test_operations.py +index 5c81c377..dee57cbe 100644 +--- a/tests/test_operations.py ++++ b/tests/test_operations.py +@@ -22,8 +22,7 @@ def test_operations(self): + self.assertIsInstance(point.envelope, Point) + + # Intersection +- self.assertIsInstance(point.intersection(Point(-1, -1)), +- GeometryCollection) ++ self.assertTrue(point.intersection(Point(-1, -1)).is_empty) + + # Buffer + self.assertIsInstance(point.buffer(10.0), Polygon) diff --git a/python-Shapely.changes b/python-Shapely.changes index 8060b76..2735584 100644 --- a/python-Shapely.changes +++ b/python-Shapely.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 10 15:08:19 UTC 2020 - Guillaume GARDET + +- Fix build with upstream patch: + * fix-build-with-geos-3.8.0.patch + ------------------------------------------------------------------- Thu Jun 13 16:01:29 UTC 2019 - Todd R diff --git a/python-Shapely.spec b/python-Shapely.spec index 6659c42..45149c0 100644 --- a/python-Shapely.spec +++ b/python-Shapely.spec @@ -1,7 +1,7 @@ # # spec file for package python-Shapely # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,18 +16,19 @@ # -%bcond_without test - %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python +%bcond_without test Name: python-Shapely Version: 1.6.4.post2 Release: 0 Summary: Geospatial geometries, predicates, and operations License: BSD-3-Clause Group: Development/Libraries/Python -Url: https://github.com/Toblerity/Shapely +URL: https://github.com/Toblerity/Shapely Source: https://files.pythonhosted.org/packages/source/S/Shapely/Shapely-%{version}.tar.gz +# PATCH-FIX-UPSTREAM - https://github.com/Toblerity/Shapely/pull/800 +Patch1: fix-build-with-geos-3.8.0.patch BuildRequires: %{python_module Cython >= 0.19} BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel} @@ -35,6 +36,7 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: geos-devel >= 3.3 BuildRequires: python-rpm-macros +Requires: geos >= 3.3 # SECTION test requirements BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module pytest} @@ -42,7 +44,6 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module matplotlib} %endif # /SECTION -Requires: geos >= 3.3 %ifpython2 Obsoletes: %{oldpython}-shapely < %{version} Provides: %{oldpython}-shapely = %{version} @@ -51,7 +52,6 @@ Provides: %{oldpython}-shapely = %{version} Obsoletes: python3-shapely < %{version} Provides: python3-shapely = %{version} %endif - %python_subpackages %description @@ -64,6 +64,7 @@ and pyproj. %prep %setup -q -n Shapely-%{version} +%patch1 -p1 %build CFLAGS="%{optflags} `geos-config --cflags` LDFLAGS=`geos-config --clibs`" @@ -85,7 +86,8 @@ mv shapely_temp shapely %files %{python_files} %defattr(-,root,root,-) -%doc CREDITS.txt LICENSE.txt README.rst docs/* +%license LICENSE.txt +%doc CREDITS.txt README.rst docs/* %{python_sitearch}/* %changelog