4f2d421
%bcond_without descartes
c75bd8b
makerpm 7be203b
Name:           python-shapely
68b4900
Version:        1.7.1
4f2d421
Release:        7%{?dist}
ee0257a
Summary:        Manipulation and analysis of geometric objects in the Cartesian plane
makerpm 7be203b
makerpm 7be203b
License:        BSD
bb9743a
URL:            https://github.com/Toblerity/Shapely
0d2f141
Source0:        %{url}/archive/%{version}%{?prerel}.tar.gz
c1f4370
7d881ac
# Backport a relevant subset of commit
7d881ac
# 611a0b3b2047bf8a49db32dc4b30684a10f5b6eb, which fixes
7d881ac
# https://github.com/Toblerity/Shapely/issues/1079 (Test failure with geos
7d881ac
# 3.9.0) and corresponds to https://github.com/Toblerity/Shapely/pull/1042/
7d881ac
# (Expand CI and tests to support GEOS 3.9.0beta2). The particular test vectors
7d881ac
# must be adjusted in the backport because
7d881ac
# https://github.com/Toblerity/Shapely/pull/1031 is not in 1.7.1;
7d881ac
# in particular, “WKTWriter.defaults = {}” is still in tests/__init__.py.
7d881ac
Patch1:         shapely-1.7.1-611a0b3b-subset.patch
32ed2ae
# Fix test failures in test_wkb.py on big-endian platforms (s390x); fixes
32ed2ae
# RHBZ#1937719 and upstream bug
32ed2ae
# https://github.com/Toblerity/Shapely/issues/1102 by applying the contents of
32ed2ae
# https://github.com/Toblerity/Shapely/pull/1103.
32ed2ae
Patch2:         shapely-1.7.1-test_wkb-endianness.patch
7d881ac
416f5fb
BuildRequires:  gcc
b412104
BuildRequires:  geos-devel
makerpm 7be203b
ee0257a
BuildRequires:  python3-devel
0b52e1c
BuildRequires:  python3dist(setuptools)
0b52e1c
BuildRequires:  python3dist(cython)
dcd9a3a
# Vendored upstream, but we remove the vendored copy:
0b52e1c
BuildRequires:  python3dist(packaging)
7fd19e4
7fd19e4
# Vectorize extra (and tests)
0b52e1c
BuildRequires:  python3dist(numpy)
7fd19e4
7fd19e4
# Tests
0b52e1c
BuildRequires:  python3dist(pytest)
0b52e1c
0b52e1c
# Tests and documentation
0b52e1c
BuildRequires:  python3dist(matplotlib)
ee0257a
7fd19e4
# Documentation
7fd19e4
BuildRequires:  make
0b52e1c
BuildRequires:  python3dist(sphinx)
4f2d421
%if %{with descartes}
0b52e1c
BuildRequires:  python3dist(descartes) >= 1.0.1
c75bd8b
%endif
7fd19e4
b1f5208
%global _description %{expand:
b1f5208
Shapely is a package for creation, manipulation, and analysis of planar
b1f5208
geometry objects – designed especially for developers of cutting edge
b1f5208
geographic information systems. In a nutshell: Shapely lets you do PostGIS-ish
b1f5208
stuff outside the context of a database using idiomatic Python.
ee0257a
b1f5208
You can use this package with python-matplotlib and numpy. See README.rst for
b1f5208
more information!}
86718e9
d7f3b61
%description %_description
d7f3b61
c1f4370
8c8d247
%{?python_extras_subpkg:%python_extras_subpkg -n python3-shapely -i %{python3_sitearch}/*.egg-info vectorized}
8c8d247
8c8d247
ee0257a
%package -n python3-shapely
ee0257a
Summary:        Manipulation and analysis of geometric objects in the Cartesian plane
ea1125d
%if 0%{?fedora} == 32
ea1125d
%py_provides python3-shapely
ea1125d
%endif
ee0257a
c8950ec
%description -n python3-shapely %_description
ee0257a
makerpm 7be203b
7fd19e4
%package doc
7fd19e4
Summary:        Documentation for %{name}
7fd19e4
BuildArch:      noarch
7fd19e4
7fd19e4
%description doc %_description
7fd19e4
7fd19e4
makerpm 7be203b
%prep
c8950ec
%autosetup -p1 -n Shapely-%{version}%{?prerel}
makerpm 7be203b
dcd9a3a
# Remove vendored python-packaging
dcd9a3a
rm -rf _vendor
dcd9a3a
sed -r -i 's/_vendor\.//g' setup.py
dcd9a3a
9ddf9b9
# Currently, the GitHub tarball does not ship with pre-generated Cython C
9ddf9b9
# sources. We preventively check for them anyway, as they must be removed if
9ddf9b9
# they do appear.
9ddf9b9
find . -type f -name '*.c' -print -delete
dd53b3f
makerpm 7be203b
makerpm 7be203b
%build
268642d
%py3_build
ee0257a
7fd19e4
%make_build -C docs html SPHINXOPTS='%{?_smp_mflags}'
7fd19e4
rm -vf docs/_build/html/.buildinfo
7fd19e4
makerpm 7be203b
makerpm 7be203b
%check
e0829e2
# Ensure the “un-built” package is not imported. Otherwise compiled extensions
e0829e2
# cannot be tested.
e0829e2
mkdir empty
e0829e2
cd empty
e0829e2
ln -s ../tests/
e0829e2
32ed2ae
%pytest
ee0257a
makerpm 7be203b
makerpm 7be203b
%install
268642d
%py3_install
9ddf9b9
# Ensure that neither Cython source files nor Cython-generated C source files
9ddf9b9
# are installed; they are not useful.
9ddf9b9
find %{buildroot}%{python3_sitearch}/shapely \
9ddf9b9
     -type f \( -name '*.pyx' -o -name '*.c' \) -print -delete
makerpm 7be203b
makerpm 7be203b
ee0257a
%files -n python3-shapely
f6c26be
%license LICENSE.txt
bb9743a
%exclude %{python3_sitearch}/shapely/examples/
09656cd
%{python3_sitearch}/shapely/
c8950ec
%{python3_sitearch}/Shapely-%{version}%{?prerel}-py*.egg-info/
makerpm 7be203b
c1f4370
7fd19e4
%files doc
7fd19e4
%license LICENSE.txt
7fd19e4
7fd19e4
%doc CHANGES.txt
7fd19e4
%doc CITATION.txt
7fd19e4
%doc CODE_OF_CONDUCT.md
7fd19e4
%doc CREDITS.txt
7fd19e4
%doc FAQ.rst
7fd19e4
%doc GEOS-C-API.txt
7fd19e4
%doc README.rst
7fd19e4
7fd19e4
%doc docs/design.rst
7fd19e4
7fd19e4
%doc docs/_build/html
7fd19e4
7fd19e4
%doc shapely/examples/
7fd19e4
7fd19e4
makerpm 7be203b
%changelog
4f2d421
* Thu Mar 11 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.7.1-7
4f2d421
- Rename bootstrap conditional to “descartes”
e0829e2
- Fix skipped tests for vectorized extensions
32ed2ae
- Fix tests that failed on s390x because they assumed the host was
32ed2ae
  little-endian (RHBZ#1937719,
32ed2ae
  https://github.com/Toblerity/Shapely/issues/1102)
4f2d421
0b52e1c
* Thu Mar 11 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.7.1-6
0b52e1c
- Switch to python3dist(…) style BR’s
0b52e1c
c75bd8b
* Thu Mar 11 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.7.1-5
c75bd8b
- Add bootstrap conditional to break circular dependency with python-descartes,
c75bd8b
  used for HTML documentation
c75bd8b
0d2f141
* Wed Mar 10 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.7.1-4
0d2f141
- Use %%url macro to shorten Source0 URL
b1f5208
- Use expand: to clean up description macro
c1f4370
- Improve whitespace consistency
ea1125d
- Drop python_provide macro, which is obsolete in Fedora
7d881ac
- Fix SvgTestCase.test_collection failing with geos 3.9.0
7d881ac
  (https://github.com/Toblerity/Shapely/issues/1079, RHBZ #1907955)
9ddf9b9
- Improve handling of Cython and Cython-generated C source files
e46b5ba
- Use the %%pytest macro instead of deprecated “python3 setup.py test”; this
e46b5ba
  also ensures we test the built package rather than re-compiling extensions in
e46b5ba
  %%check
8c8d247
- Add metapackage for “vectorized” extra
f6c26be
- Install LICENSE.txt
7fd19e4
- Add a -doc subpackage and build the HTML documentation
173dc7d
- Work around s390x test failures; RHBZ to be filed
0d2f141
3a92ed6
* Sat Feb 13 2021 Sandro Mani <manisandro@gmail.com> - 1.7.1-3
3a92ed6
- Rebuild (geos)
3a92ed6
af81af0
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
af81af0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
af81af0
68b4900
* Fri Aug 21 2020 Volker Fröhlich <volker27@gmx.at> - 1.7.1-1
68b4900
- New upstream release
68b4900
ebf15fd
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-5
ebf15fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ebf15fd
c8950ec
* Wed Jun 17 2020 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-4
c8950ec
- Update to 1.7.0 final (#1795751)
c8950ec
a31a3ba
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.7-3b1
a31a3ba
- Rebuilt for Python 3.9
a31a3ba
ce3a293
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-2b1
ce3a293
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ce3a293
c9a081d
* Fri Jan 17 2020 Volker Fröhlich <volker27@gmx.at> - 1.7-1.b1
c9a081d
e915794
* Tue Jan 07 2020 Volker Fröhlich <volker27@gmx.at> - 1.7-1.a3
e915794
- New upstream release
e915794
- Don't run cython on our own
e915794
- Change source URL
e915794
- Remove generated C file unconditionally
e915794
b052304
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.6.4-9.post2
b052304
- Rebuilt for Python 3.8.0rc1 (#1748018)
b052304
7285e13
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.6.4-8.post2
7285e13
- Rebuilt for Python 3.8
7285e13
92eabe8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-7.post2
92eabe8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
92eabe8
4da1321
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-6.post2
4da1321
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
4da1321
268642d
* Fri Jan 04 2019 Miro Hrončok <mhroncok@redhat.com> - 1.6.4-5.post2
268642d
- Remove python2 subpackage
268642d
1186336
* Thu Aug 02 2018 Volker Fröhlich <volker27@gmx.at> - 1.6.4-4.post2
1186336
- New upstream release
416f5fb
- Add missing BR on gcc (Cython)
1186336
b574523
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-3.post1
b574523
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b574523
d379ac7
* Thu Jul 05 2018 Volker Fröhlich <volker27@gmx.at> - 1.6.4-2.post1
c1f4370
- Merge Miro's pull request removing filter_provides and
d379ac7
  correcting the python_provide macro; Also adding it to the Python 3
d379ac7
  sub-package
d379ac7
bb9743a
* Wed Jul 04 2018 Volker Fröhlich <volker27@gmx.at> - 1.6.4-1.post1
bb9743a
- New upstream release
132b50e
- Use unambiguous python2 macros
bb9743a
f3ccd0c
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.5.16-13
f3ccd0c
- Rebuilt for Python 3.7
f3ccd0c
153b232
* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.5.16-12
153b232
- Update Python 2 dependency declarations to new packaging standards
153b232
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
153b232
09656cd
* Fri Feb 16 2018 2018 Lumír Balhar <lbalhar@redhat.com> - 1.5.16-11
09656cd
- Fix directory ownership
09656cd
876f00b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.16-10
876f00b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
876f00b
d7f3b61
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.5.16-9
d7f3b61
- Python 2 binary package renamed to python2-shapely
d7f3b61
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
d7f3b61
18222e2
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.16-8
18222e2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
18222e2
29d4045
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.16-7
29d4045
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
29d4045
Igor Gnatenko 3cddde7
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.5.16-6
Igor Gnatenko 3cddde7
- Rebuild due to bug in RPM (RHBZ #1468476)
Igor Gnatenko 3cddde7
1e278bb
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.16-5
1e278bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
1e278bb
6b403e6
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.5.16-4
6b403e6
- Rebuild for Python 3.6
6b403e6
d759bdd
* Sat Oct 15 2016 Peter Robinson <pbrobinson@fedoraproject.org> - 1.5.16-3
d759bdd
- rebuilt for matplotlib-2.0.0
d759bdd
ce650f6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.16-2
ce650f6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
ce650f6
e9ba283
* Sat May 28 2016 Volker Fröhlich <volker27@gmx.at> - 1.5.16-1
e9ba283
- New upstream release
e9ba283
9bf7d88
* Tue Mar 29 2016 Volker Fröhlich <volker27@gmx.at> - 1.5.15-1
9bf7d88
- New upstream release
9bf7d88
778270c
* Wed Mar 02 2016 Miro Hrončok <mhroncok@redhat.com> - 1.5.13-1
778270c
- Update to 1.5.13 (#1181550)
778270c
- BR pytest and matplotlib for tests
778270c
dcf8233
* Wed Mar 02 2016 Miro Hrončok <mhroncok@redhat.com> - 1.5.13-1
dcf8233
- Update to 1.5.13 (#1181550)
dcf8233
- BR pytest and matplotlib for tests
dcf8233
b1eee2d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-4
b1eee2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b1eee2d
72bd54e
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-3
72bd54e
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
72bd54e
c7ebcbe
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-2
c7ebcbe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c7ebcbe
93dff58
* Mon Jan  5 2015 Volker Fröhlich <volker27@gmx.at> - 1.5.2-1
93dff58
- New upstream release
93dff58
4c51178
* Sat Dec  6 2014 Volker Fröhlich <volker27@gmx.at> - 1.5.1-1
4c51178
- New upstream release
4c51178
1135f6c
* Tue Nov  4 2014 Volker Fröhlich <volker27@gmx.at> - 1.4.4-1
1135f6c
- New upstream release
1135f6c
77c6156
* Wed Oct  8 2014 Volker Fröhlich <volker27@gmx.at> - 1.4.3-1
77c6156
- New upstream release
77c6156
e555f37
* Tue Sep 30 2014 Volker Fröhlich <volker27@gmx.at> - 1.4.2-1
e555f37
- New upstream release
e555f37
ec292ea
* Wed Sep 24 2014 Volker Fröhlich <volker27@gmx.at> - 1.4.1-1
ec292ea
- New upstream release
ec292ea
ca8a746
* Thu Sep 18 2014 Volker Fröhlich <volker27@gmx.at> - 1.4.0-1
ca8a746
- New upstream release
ca8a746
- Add BR on Cython/python3-cython and build the C extension
ca8a746
- Update URL
ca8a746
- Remove the obsolete encoding patch
ca8a746
48fd745
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-4
48fd745
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
48fd745
f54595f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-3
f54595f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f54595f
484864c
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.3.2-2
484864c
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
484864c
d9a7ebe
* Fri May 23 2014 Volker Fröhlich <volker27@gmx.at> - 1.3.2-1
d9a7ebe
- New upstream release
d9a7ebe
99269cc
* Thu Apr 24 2014 Volker Fröhlich <volker27@gmx.at> - 1.3.1-1
99269cc
- New upstream release
99269cc
fe94e4e
* Sat Apr 19 2014 Volker Fröhlich <volker27@gmx.at> - 1.3.0-2
fe94e4e
- Replace obsolete python-setuptools-devel with python-setuptools
fe94e4e
ee0257a
* Wed Feb 12 2014 Volker Fröhlich <volker27@gmx.at> - 1.3.0-1
ee0257a
- New upstream release
ee0257a
- Use a better summary
ee0257a
- Add Python 3 builds
ee0257a
- Change BR python-devel to python2-devel
ee0257a
b5ece57
* Mon Sep 16 2013 Volker Fröhlich <volker27@gmx.at> - 1.2.18-1
b5ece57
- New upstream release
b5ece57
4503df4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.17-2
4503df4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4503df4
ec61408
* Sun Jan 27 2013 Volker Fröhlich <volker27@gmx.at> - 1.2.17-1
ec61408
- New upstream release
ec61408
22463b8
* Tue Sep 18 2012 Volker Fröhlich <volker27@gmx.at> - 1.2.16-1
22463b8
- New upstream release
22463b8
d470f5c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.15-2
d470f5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d470f5c
dd1f1c0
* Thu Jun 28 2012 Volker Fröhlich <volker27@gmx.at> - 1.2.15-1
dd1f1c0
- New upstream release
dd1f1c0
- Pyx file is no longer part of the sources, thus Cython is no longer BR
dd1f1c0
- Chaintest is working fine now, drop the patch
dd1f1c0
6ebbdbe
* Sun Apr  8 2012 Volker Fröhlich <volker27@gmx.at> - 1.2.14-1
6ebbdbe
- Update for release 1.2.14
6ebbdbe
- Remove duplicate PKG-INFO file
6ebbdbe
- Correct description -- pointing to README.rst now
6ebbdbe
- Add patch that corrects the attribute chaining test
6ebbdbe
- Tests now work fine, therefore respect their outcome
6ebbdbe
- Remove ready-made _speedups.c
6ebbdbe
f7afb4f
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.13-2
f7afb4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f7afb4f
b5ece57
* Tue Aug 16 2011 Volker Fröhlich <volker27@gmx.at> - 1.2.13-1
58491b2
- Update for release 1.2.13
58491b2
b5ece57
* Tue Aug 16 2011 Volker Fröhlich <volker27@gmx.at> - 1.2.12-1
b412104
- Update for release 1.2.12
b412104
- Don't ship tests
b412104
- Label examples as documentation
b412104
b412104
* Mon Aug 15 2011 Volker Fröhlich <volker27@gmx.at> - 1.2.11-2
b412104
- BR numpy for the tests
b412104
b412104
* Mon Aug 15 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.2.11-2
b412104
- BR geos-devel to actually build arch specific bits
b412104
- Drop unneeded geos dep
b412104
c1f4370
* Fri Aug 12 2011 Volker Fröhlich <volker27@gmx.at> - 1.2.11-1
86718e9
- Updated for 1.2.11
86718e9
- Switch away from noarch
86718e9
- Remove useless clean section and rm in install
86718e9
- Debian patch to rebuild Cython .c file
86718e9
- Avoid private provides for .so
86718e9
- Extend package description
86718e9
c1f4370
* Fri Apr 01 2011 Volker Fröhlich <volker27@gmx.at> - 1.2.9-1
a11d43f
- Updated for 1.2.9
a11d43f
- Added tests again, but ignore the results
a11d43f
c1f4370
* Fri Feb 25 2011 Volker Fröhlich <volker27@gmx.at> - 1.2.8-1
622be4f
- Updated for 1.2.8
622be4f
- Disable tests
622be4f
5be81ca
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-3
5be81ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
5be81ca
c1f4370
* Sat Nov 27 2010 Volker Fröhlich <volker27@gmx.at> - 1.2.7-2
makerpm 7be203b
- Explained excluded files; added check section
makerpm 7be203b
c1f4370
* Wed Nov 24 2010 Volker Fröhlich <volker27@gmx.at> - 1.2.7-1
makerpm 7be203b
- Initial package for Fedora