[packages/python-shapely] - cleanups

qboosh qboosh at pld-linux.org
Thu Sep 26 22:18:46 CEST 2024


commit 3729bf8bc164654fe8906f927161069ce98d1e62
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Sep 26 22:21:47 2024 +0200

    - cleanups

 python-shapely.spec | 84 ++++++++++++++++++++++++++++-------------------------
 1 file changed, 45 insertions(+), 39 deletions(-)
---
diff --git a/python-shapely.spec b/python-shapely.spec
index 17e3312..89dc1cd 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -1,25 +1,45 @@
-# TODO: Package examples to _examplesdir ?
+# TODO: Package shapely/examples to _examplesdir ?
 #
 # Conditional build:
 %bcond_with	tests	# unit tests
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 
-%define		module	shapely
+%define	module	shapely
 Summary:	Geospatial geometries, predicates, and operations for Python
+Summary(pl.UTF-8):	Geometrie, predykaty i operacje geoprzestrzenne dla Pythona
 Name:		python-%{module}
+# keep 1.7.x here for python2 support
 Version:	1.7.1
 Release:	4
 License:	BSD
 Group:		Development/Languages/Python
-Source0:	http://pypi.python.org/packages/source/S/Shapely/Shapely-%{version}.tar.gz
+Source0:	https://files.pythonhosted.org/packages/source/S/Shapely/Shapely-%{version}.tar.gz
 # Source0-md5:	2bf7bc1199b3a88b13c12109cd3d2429
-URL:		http://pypi.python.org/pypi/Shapely
-BuildRequires:	python-devel
+URL:		https://pypi.org/project/Shapely
+BuildRequires:	geos-devel >= 3.3
+%if %{with python2}
+BuildRequires:	python-Cython
+BuildRequires:	python-devel >= 1:2.7
+BuildRequires:	python-numpy-devel
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-pytest
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-Cython
+BuildRequires:	python3-devel >= 1:3.4
+BuildRequires:	python3-numpy-devel
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-pytest
+%endif
+%endif
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.710
-Requires:	geos >= 3.1
-Requires:	python-modules
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	geos >= 3.3
+Requires:	python-modules >= 1:2.7
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -28,14 +48,15 @@ geospatial geometries. It is based on GEOS. Shapely is not concerned
 with data formats or coordinate reference systems.
 
 %description -l pl.UTF-8
-Pakiet do manipulacji i anlizy duwymiarowych geoptrzestrzennych
-geometrii. Bazuje na GEOS, nie zajmuje się formatami danych czy
-układami odniesnienia danych.
+Pakiet do operacji i analizy dwuwymiarowych geometrii
+geoprzestrzennych. Jest oparty na GEOS, nie zajmuje się formatami
+danych czy układami odniesienia współrzędnych.
 
 %package -n python3-%{module}
 Summary:	Geospatial geometries, predicates, and operations for Python
+Summary(pl.UTF-8):	Geometrie, predykaty i operacje geoprzestrzenne dla Pythona
 Group:		Libraries/Python
-Requires:	python3-modules
+Requires:	python3-modules >= 1:3.4
 
 %description -n python3-%{module}
 Shapely is a Python package for manipulation and analysis of 2D
@@ -43,9 +64,9 @@ geospatial geometries. It is based on GEOS. Shapely is not concerned
 with data formats or coordinate reference systems.
 
 %description -n python3-%{module} -l pl.UTF-8
-Pakiet do manipulacji i anlizy duwymiarowych geoptrzestrzennych
-geometrii. Bazuje na GEOS, nie zajmuje się formatami danych czy
-układami odniesnienia danych.
+Pakiet do operacji i analizy dwuwymiarowych geometrii
+geoprzestrzennych. Jest oparty na GEOS, nie zajmuje się formatami
+danych czy układami odniesienia współrzędnych.
 
 %prep
 %setup -q -n Shapely-%{version}
@@ -65,32 +86,20 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %py_install
 
-# when files are installed in other way that standard 'setup.py
-# they need to be (re-)compiled
-# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/shapely/_geos.pxi
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/shapely/speedups/_speedups.{c,pyx}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/shapely/vectorized/_vectorized.{c,pyx}
 
 %py_postclean
 %endif
 
 %if %{with python3}
 %py3_install
-%endif
-
-#%if %{with python2}
-#install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}
-#cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}
-#find $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version} -name '*.py' \
-#	| xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
-#%endif
-#%if %{with python3}
-#install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
-#cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
-#find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version} -name '*.py' \
-#	| xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
-#%endif
 
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/shapely/_geos.pxi
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/shapely/speedups/_speedups.{c,pyx}
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/shapely/vectorized/_vectorized.{c,pyx}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -98,11 +107,9 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-# %doc CHANGES.txt CREDITS.txt HISTORY.txt README.txt
+%doc CHANGES.txt CREDITS.txt LICENSE.txt README.rst
 %dir %{py_sitedir}/%{module}
-# %{py_sitescriptdir}/%{module}/ctypes_declarations.py
 %{py_sitedir}/%{module}/*.py[co]
-
 %dir %{py_sitedir}/%{module}/algorithms
 %{py_sitedir}/%{module}/algorithms/*.py[co]
 %dir %{py_sitedir}/%{module}/examples
@@ -121,11 +128,10 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
+%doc CHANGES.txt CREDITS.txt LICENSE.txt README.rst
 %dir %{py3_sitedir}/%{module}
 %{py3_sitedir}/%{module}/__pycache__
-# %{py_sitescriptdir}/%{module}/ctypes_declarations.py
 %{py3_sitedir}/%{module}/*.py
-
 %dir %{py3_sitedir}/%{module}/algorithms
 %{py3_sitedir}/%{module}/algorithms/__pycache__
 %{py3_sitedir}/%{module}/algorithms/*.py
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-shapely.git/commitdiff/3729bf8bc164654fe8906f927161069ce98d1e62



More information about the pld-cvs-commit mailing list