The package rpms/python-shapely.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python-shapely.git/commit/?id=32e...
https://src.fedoraproject.org/cgit/rpms/python-shapely.git/commit/?id=173....
Change:
-%ifarch s390x
+%ifarch s390x
Thanks.
Full change:
============
commit 32ed2ae5945a0285347e6f2a33e643241b2d02e9
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Fri Mar 12 10:26:32 2021 -0500
Fix tests that failed on s390x because they assumed the host was little-endian
(RHBZ#1937719,
https://github.com/Toblerity/Shapely/issues/1102)
diff --git a/python-shapely.spec b/python-shapely.spec
index 58e38f8..e1bc696 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -1,5 +1,3 @@
-%bcond_with failing_s390x_tests
-
%bcond_without descartes
Name: python-shapely
@@ -20,6 +18,11 @@ Source0: %{url}/archive/%{version}%{?prerel}.tar.gz
#
https://github.com/Toblerity/Shapely/pull/1031 is not in 1.7.1;
# in particular, “WKTWriter.defaults = {}” is still in tests/__init__.py.
Patch1: shapely-1.7.1-611a0b3b-subset.patch
+# Fix test failures in test_wkb.py on big-endian platforms (s390x); fixes
+# RHBZ#1937719 and upstream bug
+#
https://github.com/Toblerity/Shapely/issues/1102 by applying the contents of
+#
https://github.com/Toblerity/Shapely/pull/1103.
+Patch2: shapely-1.7.1-test_wkb-endianness.patch
BuildRequires: gcc
BuildRequires: geos-devel
@@ -104,14 +107,7 @@ mkdir empty
cd empty
ln -s ../tests/
-%if %{without failing_s390x_tests}
-%ifarch s390x
-k="not test_dumps_srid and not test_dumps_endianness and not test_dumps_hex \
-and not test_loads_srid and not test_point_empty and not test_point_z_empty"
-%global pytest_skips -k "${k}"
-%endif
-%endif
-%pytest %{?pytest_skips}
+%pytest
%install
@@ -151,6 +147,9 @@ find %{buildroot}%{python3_sitearch}/shapely \
* Thu Mar 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-7
- Rename bootstrap conditional to “descartes”
- Fix skipped tests for vectorized extensions
+- Fix tests that failed on s390x because they assumed the host was
+ little-endian (RHBZ#1937719,
+
https://github.com/Toblerity/Shapely/issues/1102)
* Thu Mar 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-6
- Switch to python3dist(…) style BR’s
diff --git a/shapely-1.7.1-test_wkb-endianness.patch
b/shapely-1.7.1-test_wkb-endianness.patch
new file mode 100644
index 0000000..abc3c5d
--- /dev/null
+++ b/shapely-1.7.1-test_wkb-endianness.patch
@@ -0,0 +1,110 @@
+diff --git a/tests/test_wkb.py b/tests/test_wkb.py
+index ddc2f46..8ee6dca 100644
+--- a/tests/test_wkb.py
++++ b/tests/test_wkb.py
+@@ -1,4 +1,6 @@
+ import binascii
++import struct
++import sys
+
+ import pytest
+
+@@ -17,18 +19,47 @@ def hex2bin(value):
+ return binascii.a2b_hex(value)
+
+
++def hostorder(fmt, value):
++ """Re-pack a hex WKB value to native endianness if needed
++
++ This routine does not understand WKB format, so it must be provided a
++ struct module format string, without initial indicator character
("@=<>!"),
++ which will be interpreted as big- or little-endian with standard sizes
++ depending on the endian flag in the first byte of the value.
++ """
++
++ if fmt and fmt[0] in "@=<>!":
++ raise ValueError("Initial indicator character, one of @=<>!, in
fmt")
++ if not fmt or fmt[0] not in "cbB":
++ raise ValueError("Missing endian flag in fmt")
++
++ (hexendian,) = struct.unpack(fmt[0], hex2bin(value[:2]))
++ hexorder = {0: ">", 1: "<"}[hexendian]
++ sysorder = {"little": "<", "big":
">"}[sys.byteorder]
++ if hexorder == sysorder:
++ return value # Nothing to do
++
++ return bin2hex(struct.pack(
++ sysorder + fmt,
++ {">": 0, "<": 1}[sysorder],
++ *struct.unpack(hexorder + fmt, hex2bin(value))[1:]))
++
++
+ def test_dumps_srid():
+ p1 = Point(1.2, 3.4)
+ result = dumps(p1)
+- assert bin2hex(result) == "0101000000333333333333F33F3333333333330B40"
++ assert bin2hex(result) == hostorder(
++ "BIdd", "0101000000333333333333F33F3333333333330B40")
+ result = dumps(p1, srid=4326)
+- assert bin2hex(result) ==
"0101000020E6100000333333333333F33F3333333333330B40"
++ assert bin2hex(result) == hostorder(
++ "BIIdd",
"0101000020E6100000333333333333F33F3333333333330B40")
+
+
+ def test_dumps_endianness():
+ p1 = Point(1.2, 3.4)
+ result = dumps(p1)
+- assert bin2hex(result) == "0101000000333333333333F33F3333333333330B40"
++ assert bin2hex(result) == hostorder(
++ "BIdd", "0101000000333333333333F33F3333333333330B40")
+ result = dumps(p1, big_endian=False)
+ assert bin2hex(result) == "0101000000333333333333F33F3333333333330B40"
+ result = dumps(p1, big_endian=True)
+@@ -38,8 +69,9 @@ def test_dumps_endianness():
+ def test_dumps_hex():
+ p1 = Point(1.2, 3.4)
+ result = dumps(p1, hex=True)
+- assert result == "0101000000333333333333F33F3333333333330B40"
+-
++ assert result == hostorder(
++ "BIdd", "0101000000333333333333F33F3333333333330B40")
++
+
+ def test_loads_srid():
+ # load a geometry which includes an srid
+@@ -48,13 +80,16 @@ def test_loads_srid():
+ assert geom.coords[:] == [(1.2, 3.4)]
+ # by default srid is not exported
+ result = dumps(geom)
+- assert bin2hex(result) == "0101000000333333333333F33F3333333333330B40"
++ assert bin2hex(result) == hostorder(
++ "BIdd", "0101000000333333333333F33F3333333333330B40")
+ # include the srid in the output
+ result = dumps(geom, include_srid=True)
+- assert bin2hex(result) ==
"0101000020E6100000333333333333F33F3333333333330B40"
++ assert bin2hex(result) == hostorder(
++ "BIIdd",
"0101000020E6100000333333333333F33F3333333333330B40")
+ # replace geometry srid with another
+ result = dumps(geom, srid=27700)
+- assert bin2hex(result) ==
"0101000020346C0000333333333333F33F3333333333330B40"
++ assert bin2hex(result) == hostorder(
++ "BIIdd",
"0101000020346C0000333333333333F33F3333333333330B40")
+
+
+ requires_geos_39 = pytest.mark.xfail(
+@@ -64,11 +99,12 @@ requires_geos_39 = pytest.mark.xfail(
+ @requires_geos_39
+ def test_point_empty():
+ g = wkt.loads("POINT EMPTY")
+- assert g.wkb_hex == "0101000000000000000000F87F000000000000F87F"
++ assert g.wkb_hex == hostorder(
++ "BIdd", "0101000000000000000000F87F000000000000F87F")
+
+
+ @requires_geos_39
+ def test_point_z_empty():
+ g = wkt.loads("POINT Z EMPTY")
+- assert g.wkb_hex == \
+- "0101000080000000000000F87F000000000000F87F000000000000F87F"
++ assert g.wkb_hex == hostorder(
++ "BIddd",
"0101000080000000000000F87F000000000000F87F000000000000F87F")
commit e0829e2aafe6663a988316dbb3633b7b30d0a576
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Fri Mar 12 09:16:04 2021 -0500
Fix skipped tests for vectorized extensions
diff --git a/python-shapely.spec b/python-shapely.spec
index 399f131..58e38f8 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -98,6 +98,12 @@ rm -vf docs/_build/html/.buildinfo
%check
+# Ensure the “un-built” package is not imported. Otherwise compiled extensions
+# cannot be tested.
+mkdir empty
+cd empty
+ln -s ../tests/
+
%if %{without failing_s390x_tests}
%ifarch s390x
k="not test_dumps_srid and not test_dumps_endianness and not test_dumps_hex \
@@ -144,6 +150,7 @@ find %{buildroot}%{python3_sitearch}/shapely \
%changelog
* Thu Mar 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-7
- Rename bootstrap conditional to “descartes”
+- Fix skipped tests for vectorized extensions
* Thu Mar 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-6
- Switch to python3dist(…) style BR’s
commit 4f2d42147926be8da2694a863d2e97701f9f9692
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Thu Mar 11 08:44:59 2021 -0500
Rename bootstrap conditional to “descartes”
diff --git a/python-shapely.spec b/python-shapely.spec
index 6e7f457..399f131 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -1,12 +1,10 @@
%bcond_with failing_s390x_tests
-# The function of bootstrap is that it breaks a circular dependency on
-# python-descartes, which is used only for the documentation.
-%bcond_with bootstrap
+%bcond_without descartes
Name: python-shapely
Version: 1.7.1
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Manipulation and analysis of geometric objects in the Cartesian plane
License: BSD
@@ -44,7 +42,7 @@ BuildRequires: python3dist(matplotlib)
# Documentation
BuildRequires: make
BuildRequires: python3dist(sphinx)
-%if 0%{?without bootstrap}
+%if %{with descartes}
BuildRequires: python3dist(descartes) >= 1.0.1
%endif
@@ -144,6 +142,9 @@ find %{buildroot}%{python3_sitearch}/shapely \
%changelog
+* Thu Mar 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-7
+- Rename bootstrap conditional to “descartes”
+
* Thu Mar 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-6
- Switch to python3dist(…) style BR’s
commit 0b52e1ca3068ac3ff65549c2ead7ca32279f9521
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Thu Mar 11 08:20:01 2021 -0500
Switch to python3dist(…) style BR’s
diff --git a/python-shapely.spec b/python-shapely.spec
index 8129122..6e7f457 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -6,7 +6,7 @@
Name: python-shapely
Version: 1.7.1
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Manipulation and analysis of geometric objects in the Cartesian plane
License: BSD
@@ -27,24 +27,25 @@ BuildRequires: gcc
BuildRequires: geos-devel
BuildRequires: python3-devel
-BuildRequires: python3-Cython
-BuildRequires: python3-setuptools
+BuildRequires: python3dist(setuptools)
+BuildRequires: python3dist(cython)
# Vendored upstream, but we remove the vendored copy:
-BuildRequires: python3-packaging
+BuildRequires: python3dist(packaging)
# Vectorize extra (and tests)
-BuildRequires: python3-numpy
+BuildRequires: python3dist(numpy)
# Tests
-BuildRequires: python3-pytest
-BuildRequires: python3-matplotlib
+BuildRequires: python3dist(pytest)
+
+# Tests and documentation
+BuildRequires: python3dist(matplotlib)
# Documentation
BuildRequires: make
-BuildRequires: python3-sphinx
-BuildRequires: python3-matplotlib
+BuildRequires: python3dist(sphinx)
%if 0%{?without bootstrap}
-BuildRequires: python3-descartes >= 1.0.1
+BuildRequires: python3dist(descartes) >= 1.0.1
%endif
%global _description %{expand:
@@ -143,6 +144,9 @@ find %{buildroot}%{python3_sitearch}/shapely \
%changelog
+* Thu Mar 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-6
+- Switch to python3dist(…) style BR’s
+
* Thu Mar 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-5
- Add bootstrap conditional to break circular dependency with python-descartes,
used for HTML documentation
commit c75bd8bbe73e66e621c77fc4db8fd68752e8417d
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Thu Mar 11 08:15:30 2021 -0500
Add bootstrap conditional to break circular dependency with python-descartes, used for
HTML documentation
diff --git a/python-shapely.spec b/python-shapely.spec
index ce71241..8129122 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -1,8 +1,12 @@
%bcond_with failing_s390x_tests
+# The function of bootstrap is that it breaks a circular dependency on
+# python-descartes, which is used only for the documentation.
+%bcond_with bootstrap
+
Name: python-shapely
Version: 1.7.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Manipulation and analysis of geometric objects in the Cartesian plane
License: BSD
@@ -39,7 +43,9 @@ BuildRequires: python3-matplotlib
BuildRequires: make
BuildRequires: python3-sphinx
BuildRequires: python3-matplotlib
+%if 0%{?without bootstrap}
BuildRequires: python3-descartes >= 1.0.1
+%endif
%global _description %{expand:
Shapely is a package for creation, manipulation, and analysis of planar
@@ -137,6 +143,10 @@ find %{buildroot}%{python3_sitearch}/shapely \
%changelog
+* Thu Mar 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-5
+- Add bootstrap conditional to break circular dependency with python-descartes,
+ used for HTML documentation
+
* Wed Mar 10 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-4
- Use %%url macro to shorten Source0 URL
- Use expand: to clean up description macro
commit aa1633d13348d79e48a65af1f789e39f723b2903
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Thu Mar 11 07:15:06 2021 -0500
Improve rpmlintrc
diff --git a/python-shapely.rpmlintrc b/python-shapely.rpmlintrc
index c7f27b8..1d84705 100644
--- a/python-shapely.rpmlintrc
+++ b/python-shapely.rpmlintrc
@@ -1,2 +1,4 @@
# These are not real spelling errors...
-addFilter(r'spelling-error .*(\(en_US\)| en_US) (matplotlib|numpy) ')
+addFilter(r'spelling-error .*(\(en_US\)| en_US)
(matplotlib|numpy|[Mm]etapackage|vectorized) ')
+# The documentation is in the -doc subpackage
+addFilter(r' no-documentation')
commit dcd9a3a5c5e7b6b4bd37e87eab70b5cd94aa74f0
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 16:02:58 2021 -0500
Remove vendored python-packaging
diff --git a/python-shapely.spec b/python-shapely.spec
index b12e7b2..ce71241 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -25,6 +25,8 @@ BuildRequires: geos-devel
BuildRequires: python3-devel
BuildRequires: python3-Cython
BuildRequires: python3-setuptools
+# Vendored upstream, but we remove the vendored copy:
+BuildRequires: python3-packaging
# Vectorize extra (and tests)
BuildRequires: python3-numpy
@@ -73,6 +75,10 @@ BuildArch: noarch
%prep
%autosetup -p1 -n Shapely-%{version}%{?prerel}
+# Remove vendored python-packaging
+rm -rf _vendor
+sed -r -i 's/_vendor\.//g' setup.py
+
# Currently, the GitHub tarball does not ship with pre-generated Cython C
# sources. We preventively check for them anyway, as they must be removed if
# they do appear.
commit 173dc7d89863296c7395347c18bf0a0f7435297e
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 15:58:15 2021 -0500
Work around s390x test failures; RHBZ to be filed
diff --git a/python-shapely.spec b/python-shapely.spec
index f18ba02..b12e7b2 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -1,3 +1,5 @@
+%bcond_with failing_s390x_tests
+
Name: python-shapely
Version: 1.7.1
Release: 4%{?dist}
@@ -85,7 +87,14 @@ rm -vf docs/_build/html/.buildinfo
%check
-%pytest
+%if %{without failing_s390x_tests}
+%ifarch s390x
+k="not test_dumps_srid and not test_dumps_endianness and not test_dumps_hex \
+and not test_loads_srid and not test_point_empty and not test_point_z_empty"
+%global pytest_skips -k "${k}"
+%endif
+%endif
+%pytest %{?pytest_skips}
%install
@@ -136,6 +145,7 @@ find %{buildroot}%{python3_sitearch}/shapely \
- Add metapackage for “vectorized” extra
- Install LICENSE.txt
- Add a -doc subpackage and build the HTML documentation
+- Work around s390x test failures; RHBZ to be filed
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
commit cb77399ff1daa01b057a0a302495d3e81d27a783
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 15:51:39 2021 -0500
Add rpmlintrc file
diff --git a/python-shapely.rpmlintrc b/python-shapely.rpmlintrc
new file mode 100644
index 0000000..c7f27b8
--- /dev/null
+++ b/python-shapely.rpmlintrc
@@ -0,0 +1,2 @@
+# These are not real spelling errors...
+addFilter(r'spelling-error .*(\(en_US\)| en_US) (matplotlib|numpy) ')
commit 7fd19e413c4c2f3cb7c0ae128c64b97f8cf85078
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 15:47:15 2021 -0500
Add a -doc subpackage and build the HTML documentation
diff --git a/python-shapely.spec b/python-shapely.spec
index 4caaa9d..f18ba02 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -23,11 +23,20 @@ BuildRequires: geos-devel
BuildRequires: python3-devel
BuildRequires: python3-Cython
BuildRequires: python3-setuptools
-# Tests
+
+# Vectorize extra (and tests)
BuildRequires: python3-numpy
+
+# Tests
BuildRequires: python3-pytest
BuildRequires: python3-matplotlib
+# Documentation
+BuildRequires: make
+BuildRequires: python3-sphinx
+BuildRequires: python3-matplotlib
+BuildRequires: python3-descartes >= 1.0.1
+
%global _description %{expand:
Shapely is a package for creation, manipulation, and analysis of planar
geometry objects – designed especially for developers of cutting edge
@@ -52,6 +61,13 @@ Summary: Manipulation and analysis of geometric objects in the
Cartesian
%description -n python3-shapely %_description
+%package doc
+Summary: Documentation for %{name}
+BuildArch: noarch
+
+%description doc %_description
+
+
%prep
%autosetup -p1 -n Shapely-%{version}%{?prerel}
@@ -64,6 +80,9 @@ find . -type f -name '*.c' -print -delete
%build
%py3_build
+%make_build -C docs html SPHINXOPTS='%{?_smp_mflags}'
+rm -vf docs/_build/html/.buildinfo
+
%check
%pytest
@@ -79,14 +98,29 @@ find %{buildroot}%{python3_sitearch}/shapely \
%files -n python3-shapely
%license LICENSE.txt
-%doc CHANGES.txt README.rst CREDITS.txt LICENSE.txt
-%doc docs
-%doc %{python3_sitearch}/shapely/examples/
%exclude %{python3_sitearch}/shapely/examples/
%{python3_sitearch}/shapely/
%{python3_sitearch}/Shapely-%{version}%{?prerel}-py*.egg-info/
+%files doc
+%license LICENSE.txt
+
+%doc CHANGES.txt
+%doc CITATION.txt
+%doc CODE_OF_CONDUCT.md
+%doc CREDITS.txt
+%doc FAQ.rst
+%doc GEOS-C-API.txt
+%doc README.rst
+
+%doc docs/design.rst
+
+%doc docs/_build/html
+
+%doc shapely/examples/
+
+
%changelog
* Wed Mar 10 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-4
- Use %%url macro to shorten Source0 URL
@@ -101,6 +135,7 @@ find %{buildroot}%{python3_sitearch}/shapely \
%%check
- Add metapackage for “vectorized” extra
- Install LICENSE.txt
+- Add a -doc subpackage and build the HTML documentation
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
commit f6c26be4dff819b9ca2f29bf54811c37c5ac05bb
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 15:13:59 2021 -0500
Install LICENSE.txt
diff --git a/python-shapely.spec b/python-shapely.spec
index 13ea1a1..4caaa9d 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -78,6 +78,7 @@ find %{buildroot}%{python3_sitearch}/shapely \
%files -n python3-shapely
+%license LICENSE.txt
%doc CHANGES.txt README.rst CREDITS.txt LICENSE.txt
%doc docs
%doc %{python3_sitearch}/shapely/examples/
@@ -99,6 +100,7 @@ find %{buildroot}%{python3_sitearch}/shapely \
also ensures we test the built package rather than re-compiling extensions in
%%check
- Add metapackage for “vectorized” extra
+- Install LICENSE.txt
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
commit 8c8d24793fc8df8b9cf172ab93e8fcfed861632a
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 14:45:41 2021 -0500
Add metapackage for “vectorized” extra
diff --git a/python-shapely.spec b/python-shapely.spec
index 0e6a026..13ea1a1 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -40,6 +40,9 @@ more information!}
%description %_description
+%{?python_extras_subpkg:%python_extras_subpkg -n python3-shapely -i
%{python3_sitearch}/*.egg-info vectorized}
+
+
%package -n python3-shapely
Summary: Manipulation and analysis of geometric objects in the Cartesian plane
%if 0%{?fedora} == 32
@@ -95,6 +98,7 @@ find %{buildroot}%{python3_sitearch}/shapely \
- Use the %%pytest macro instead of deprecated “python3 setup.py test”; this
also ensures we test the built package rather than re-compiling extensions in
%%check
+- Add metapackage for “vectorized” extra
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
commit e46b5baeed19190381964fbda8d0f415489032b9
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 12:44:40 2021 -0500
Use the %pytest macro instead of deprecated “python3 setup.py test”; this also ensures
we test the built package rather than re-compiling extensions in %check
diff --git a/python-shapely.spec b/python-shapely.spec
index e426462..0e6a026 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -63,7 +63,7 @@ find . -type f -name '*.c' -print -delete
%check
-%{python3} setup.py test
+%pytest
%install
@@ -92,6 +92,9 @@ find %{buildroot}%{python3_sitearch}/shapely \
- Fix SvgTestCase.test_collection failing with geos 3.9.0
(
https://github.com/Toblerity/Shapely/issues/1079, RHBZ #1907955)
- Improve handling of Cython and Cython-generated C source files
+- Use the %%pytest macro instead of deprecated “python3 setup.py test”; this
+ also ensures we test the built package rather than re-compiling extensions in
+ %%check
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
commit 9ddf9b9bea81269d53009cc4b52ff159735029eb
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 12:33:12 2021 -0500
Improve handling of Cython and Cython-generated C source files
diff --git a/python-shapely.spec b/python-shapely.spec
index 01f4349..e426462 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -52,9 +52,10 @@ Summary: Manipulation and analysis of geometric objects in the
Cartesian
%prep
%autosetup -p1 -n Shapely-%{version}%{?prerel}
-# Remove pre-generated sources
-rm -f shapely/speedups/_speedups.c
-rm -f shapely/vectorized/_vectorized.c
+# Currently, the GitHub tarball does not ship with pre-generated Cython C
+# sources. We preventively check for them anyway, as they must be removed if
+# they do appear.
+find . -type f -name '*.c' -print -delete
%build
@@ -67,8 +68,10 @@ rm -f shapely/vectorized/_vectorized.c
%install
%py3_install
-
-rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
+# Ensure that neither Cython source files nor Cython-generated C source files
+# are installed; they are not useful.
+find %{buildroot}%{python3_sitearch}/shapely \
+ -type f \( -name '*.pyx' -o -name '*.c' \) -print -delete
%files -n python3-shapely
@@ -88,6 +91,7 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
- Drop python_provide macro, which is obsolete in Fedora
- Fix SvgTestCase.test_collection failing with geos 3.9.0
(
https://github.com/Toblerity/Shapely/issues/1079, RHBZ #1907955)
+- Improve handling of Cython and Cython-generated C source files
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
commit 7d881ac37cdec7a3072ad6862ccfa82df3070e99
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 08:50:05 2021 -0500
Fix SvgTestCase.test_collection failing with geos 3.9.0
(
https://github.com/Toblerity/Shapely/issues/1079, RHBZ #1907955)
diff --git a/python-shapely.spec b/python-shapely.spec
index 8ab28ec..01f4349 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -7,6 +7,16 @@ License: BSD
URL:
https://github.com/Toblerity/Shapely
Source0: %{url}/archive/%{version}%{?prerel}.tar.gz
+# Backport a relevant subset of commit
+# 611a0b3b2047bf8a49db32dc4b30684a10f5b6eb, which fixes
+#
https://github.com/Toblerity/Shapely/issues/1079 (Test failure with geos
+# 3.9.0) and corresponds to
https://github.com/Toblerity/Shapely/pull/1042/
+# (Expand CI and tests to support GEOS 3.9.0beta2). The particular test vectors
+# must be adjusted in the backport because
+#
https://github.com/Toblerity/Shapely/pull/1031 is not in 1.7.1;
+# in particular, “WKTWriter.defaults = {}” is still in tests/__init__.py.
+Patch1: shapely-1.7.1-611a0b3b-subset.patch
+
BuildRequires: gcc
BuildRequires: geos-devel
@@ -76,6 +86,8 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
- Use expand: to clean up description macro
- Improve whitespace consistency
- Drop python_provide macro, which is obsolete in Fedora
+- Fix SvgTestCase.test_collection failing with geos 3.9.0
+ (
https://github.com/Toblerity/Shapely/issues/1079, RHBZ #1907955)
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
diff --git a/shapely-1.7.1-611a0b3b-subset.patch b/shapely-1.7.1-611a0b3b-subset.patch
new file mode 100644
index 0000000..604d10a
--- /dev/null
+++ b/shapely-1.7.1-611a0b3b-subset.patch
@@ -0,0 +1,83 @@
+diff -Naur Shapely-1.7.1-original/shapely/geos.py Shapely-1.7.1/shapely/geos.py
+--- Shapely-1.7.1-original/shapely/geos.py 2020-08-20 16:02:11.000000000 -0400
++++ Shapely-1.7.1/shapely/geos.py 2021-03-10 12:54:49.075728259 -0500
+@@ -84,7 +84,7 @@
+ 'libgeos_c.so.1',
+ 'libgeos_c.so',
+ ]
+- _lgeos = load_dll('geos_c', fallbacks=alt_paths)
++ _lgeos = load_dll('libgeos_c', fallbacks=alt_paths)
+ # Necessary for environments with only libc.musl
+ c_alt_paths = [
+ 'libc.musl-x86_64.so.1'
+diff -Naur Shapely-1.7.1-original/tests/test_create_inconsistent_dimensionality.py
Shapely-1.7.1/tests/test_create_inconsistent_dimensionality.py
+--- Shapely-1.7.1-original/tests/test_create_inconsistent_dimensionality.py 2020-08-20
16:02:11.000000000 -0400
++++ Shapely-1.7.1/tests/test_create_inconsistent_dimensionality.py 2021-03-10
14:35:22.383306748 -0500
+@@ -29,8 +29,15 @@
+
+
+ wkt_cases = [
++ # for Shapely 1.7.1, does not preserve 3rd dimension by default:
++ ('MULTIPOINT (1 1 1, 2 2)', 'MULTIPOINT (1.0000000000000000
1.0000000000000000, 2.0000000000000000 2.0000000000000000)'),
++ ('MULTIPOINT (1 1, 2 2 2)', 'MULTIPOINT (1.0000000000000000
1.0000000000000000, 2.0000000000000000 2.0000000000000000)'),
+ ('LINESTRING (1 1 1, 2 2)', 'LINESTRING (1.0000000000000000
1.0000000000000000, 2.0000000000000000 2.0000000000000000)'),
+- ('POLYGON ((0 0 0, 1 0 0, 1 1, 0 1 0, 0 0 0))', 'POLYGON
((0.0000000000000000 0.0000000000000000, 1.0000000000000000 0.0000000000000000,
1.0000000000000000 1.0000000000000000, 0.0000000000000000 1.0000000000000000,
0.0000000000000000 0.0000000000000000))')
++ ('POLYGON ((0 0 0, 1 0 0, 1 1, 0 1 0, 0 0 0))', 'POLYGON
((0.0000000000000000 0.0000000000000000, 1.0000000000000000 0.0000000000000000,
1.0000000000000000 1.0000000000000000, 0.0000000000000000 1.0000000000000000,
0.0000000000000000 0.0000000000000000))'),
++ # drop 3rd dimension
++ ('LINESTRING (1 1, 2 2 2)', 'LINESTRING (1.0000000000000000
1.0000000000000000, 2.0000000000000000 2.0000000000000000)'),
++ ('POLYGON ((0 0, 1 0 1, 1 1, 0 1, 0 0))',
++ 'POLYGON ((0.0000000000000000 0.0000000000000000, 1.0000000000000000
0.0000000000000000, 1.0000000000000000 1.0000000000000000, 0.0000000000000000
1.0000000000000000, 0.0000000000000000 0.0000000000000000))'),
+ ]
+
+
+diff -Naur Shapely-1.7.1-original/tests/test_svg.py Shapely-1.7.1/tests/test_svg.py
+--- Shapely-1.7.1-original/tests/test_svg.py 2020-08-20 16:02:11.000000000 -0400
++++ Shapely-1.7.1/tests/test_svg.py 2021-03-10 12:54:49.076728265 -0500
+@@ -174,7 +174,8 @@
+ self.assertSVG(GeometryCollection(), '<g />')
+ # Valid
+ self.assertSVG(
+- Point(7, 3).union(LineString([(4, 2), (8, 4)])),
++ GeometryCollection(
++ [Point(7, 3), LineString([(4, 2), (8, 4)])]),
+ '<g><circle cx="7.0" cy="3.0"
r="3.0" stroke="#555555" '
+ 'stroke-width="1.0" fill="#66cc99"
opacity="0.6" />'
+ '<polyline fill="none" stroke="#66cc99"
stroke-width="2.0" '
+diff -Naur Shapely-1.7.1-original/tests/test_wkb.py Shapely-1.7.1/tests/test_wkb.py
+--- Shapely-1.7.1-original/tests/test_wkb.py 2020-08-20 16:02:11.000000000 -0400
++++ Shapely-1.7.1/tests/test_wkb.py 2021-03-10 12:54:49.076728265 -0500
+@@ -1,6 +1,12 @@
++import binascii
++
++import pytest
++
++from shapely import wkt
+ from shapely.wkb import dumps, loads
+ from shapely.geometry import Point
+-import binascii
++from shapely.geos import geos_version
++
+
+
+ def bin2hex(value):
+@@ -49,3 +55,20 @@
+ # replace geometry srid with another
+ result = dumps(geom, srid=27700)
+ assert bin2hex(result) ==
"0101000020346C0000333333333333F33F3333333333330B40"
++
++
++requires_geos_39 = pytest.mark.xfail(
++ geos_version < (3, 9, 0), reason="GEOS >= 3.9.0 is required",
strict=True)
++
++
++@requires_geos_39
++def test_point_empty():
++ g = wkt.loads("POINT EMPTY")
++ assert g.wkb_hex == "0101000000000000000000F87F000000000000F87F"
++
++
++@requires_geos_39
++def test_point_z_empty():
++ g = wkt.loads("POINT Z EMPTY")
++ assert g.wkb_hex == \
++ "0101000080000000000000F87F000000000000F87F000000000000F87F"
commit ea1125dce7f824e604de866d2b21061f754e867b
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 08:29:30 2021 -0500
Drop python_provide macro, which is obsolete in Fedora
diff --git a/python-shapely.spec b/python-shapely.spec
index 7e8b54d..8ab28ec 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -32,7 +32,9 @@ more information!}
%package -n python3-shapely
Summary: Manipulation and analysis of geometric objects in the Cartesian plane
-%{?python_provide:%python_provide python3-shapely}
+%if 0%{?fedora} == 32
+%py_provides python3-shapely
+%endif
%description -n python3-shapely %_description
@@ -73,6 +75,7 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
- Use %%url macro to shorten Source0 URL
- Use expand: to clean up description macro
- Improve whitespace consistency
+- Drop python_provide macro, which is obsolete in Fedora
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
commit c1f43706844ca71ad0ba9648538c6270c783a436
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 08:26:46 2021 -0500
Improve whitespace consistency
diff --git a/python-shapely.spec b/python-shapely.spec
index aaa22b2..7e8b54d 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -6,6 +6,7 @@ Summary: Manipulation and analysis of geometric objects in the
Cartesian
License: BSD
URL:
https://github.com/Toblerity/Shapely
Source0: %{url}/archive/%{version}%{?prerel}.tar.gz
+
BuildRequires: gcc
BuildRequires: geos-devel
@@ -28,6 +29,7 @@ more information!}
%description %_description
+
%package -n python3-shapely
Summary: Manipulation and analysis of geometric objects in the Cartesian plane
%{?python_provide:%python_provide python3-shapely}
@@ -65,10 +67,12 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
%{python3_sitearch}/shapely/
%{python3_sitearch}/Shapely-%{version}%{?prerel}-py*.egg-info/
+
%changelog
* Wed Mar 10 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-4
- Use %%url macro to shorten Source0 URL
- Use expand: to clean up description macro
+- Improve whitespace consistency
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
@@ -122,7 +126,7 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jul 05 2018 Volker Fröhlich <volker27(a)gmx.at> - 1.6.4-2.post1
-- Merge Miro's pull request removing filter_provides and
+- Merge Miro's pull request removing filter_provides and
correcting the python_provide macro; Also adding it to the Python 3
sub-package
@@ -285,7 +289,7 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
- BR geos-devel to actually build arch specific bits
- Drop unneeded geos dep
-* Fri Aug 12 2011 Volker Fröhlich <volker27(a)gmx.at> - 1.2.11-1
+* Fri Aug 12 2011 Volker Fröhlich <volker27(a)gmx.at> - 1.2.11-1
- Updated for 1.2.11
- Switch away from noarch
- Remove useless clean section and rm in install
@@ -293,19 +297,19 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
- Avoid private provides for .so
- Extend package description
-* Fri Apr 01 2011 Volker Fröhlich <volker27(a)gmx.at> - 1.2.9-1
+* Fri Apr 01 2011 Volker Fröhlich <volker27(a)gmx.at> - 1.2.9-1
- Updated for 1.2.9
- Added tests again, but ignore the results
-* Fri Feb 25 2011 Volker Fröhlich <volker27(a)gmx.at> - 1.2.8-1
+* Fri Feb 25 2011 Volker Fröhlich <volker27(a)gmx.at> - 1.2.8-1
- Updated for 1.2.8
- Disable tests
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.2.7-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-* Sat Nov 27 2010 Volker Fröhlich <volker27(a)gmx.at> - 1.2.7-2
+* Sat Nov 27 2010 Volker Fröhlich <volker27(a)gmx.at> - 1.2.7-2
- Explained excluded files; added check section
-* Wed Nov 24 2010 Volker Fröhlich <volker27(a)gmx.at> - 1.2.7-1
+* Wed Nov 24 2010 Volker Fröhlich <volker27(a)gmx.at> - 1.2.7-1
- Initial package for Fedora
commit b1f5208d6f829152e8c46614eb5ddb2d84cf6199
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 08:25:30 2021 -0500
Use expand: to clean up description macro
diff --git a/python-shapely.spec b/python-shapely.spec
index 8b6094b..aaa22b2 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -17,16 +17,14 @@ BuildRequires: python3-numpy
BuildRequires: python3-pytest
BuildRequires: python3-matplotlib
+%global _description %{expand:
+Shapely is a package for creation, manipulation, and analysis of planar
+geometry objects – designed especially for developers of cutting edge
+geographic information systems. In a nutshell: Shapely lets you do PostGIS-ish
+stuff outside the context of a database using idiomatic Python.
-%global _description\
-Shapely is a package for creation, manipulation, and analysis\
-of planar geometry objects – designed especially for developers\
-of cutting edge geographic information systems. In a nutshell:\
-Shapely lets you do PostGIS-ish stuff outside the context of a\
-database using idiomatic Python.\
-\
-You can use this package with python-matplotlib and numpy.\
-See README.rst for more information!
+You can use this package with python-matplotlib and numpy. See README.rst for
+more information!}
%description %_description
@@ -70,6 +68,7 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
%changelog
* Wed Mar 10 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-4
- Use %%url macro to shorten Source0 URL
+- Use expand: to clean up description macro
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
commit 0d2f141be4aba29af7803d21ae20d5a0079c573f
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Wed Mar 10 08:24:57 2021 -0500
Use %%url macro to shorten Source0 URL
diff --git a/python-shapely.spec b/python-shapely.spec
index 9a8ebab..8b6094b 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -1,11 +1,11 @@
Name: python-shapely
Version: 1.7.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Manipulation and analysis of geometric objects in the Cartesian plane
License: BSD
URL:
https://github.com/Toblerity/Shapely
-Source0:
https://github.com/Toblerity/Shapely/archive/%{version}%{?prerel}.tar.gz
+Source0: %{url}/archive/%{version}%{?prerel}.tar.gz
BuildRequires: gcc
BuildRequires: geos-devel
@@ -68,6 +68,9 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
%{python3_sitearch}/Shapely-%{version}%{?prerel}-py*.egg-info/
%changelog
+* Wed Mar 10 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.7.1-4
+- Use %%url macro to shorten Source0 URL
+
* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
- Rebuild (geos)
commit 3a92ed65b3395f056bdf78c3f3f8561b455a14bb
Author: Sandro Mani <manisandro(a)gmail.com>
Date: Sat Feb 13 18:27:51 2021 +0100
Rebuild (geos)
diff --git a/python-shapely.spec b/python-shapely.spec
index e2a6032..9a8ebab 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -1,6 +1,6 @@
Name: python-shapely
Version: 1.7.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Manipulation and analysis of geometric objects in the Cartesian plane
License: BSD
@@ -68,6 +68,9 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
%{python3_sitearch}/Shapely-%{version}%{?prerel}-py*.egg-info/
%changelog
+* Sat Feb 13 2021 Sandro Mani <manisandro(a)gmail.com> - 1.7.1-3
+- Rebuild (geos)
+
* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.7.1-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
commit af81af0a36f7114e96882610f0d45a43356827b3
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Wed Jan 27 13:22:18 2021 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/python-shapely.spec b/python-shapely.spec
index 5759e32..e2a6032 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -1,6 +1,6 @@
Name: python-shapely
Version: 1.7.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Manipulation and analysis of geometric objects in the Cartesian plane
License: BSD
@@ -68,6 +68,9 @@ rm %{buildroot}%{python3_sitearch}/shapely/speedups/_speedups.c
%{python3_sitearch}/Shapely-%{version}%{?prerel}-py*.egg-info/
%changelog
+* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.7.1-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
* Fri Aug 21 2020 Volker Fröhlich <volker27(a)gmx.at> - 1.7.1-1
- New upstream release