[packages/python-Routes] - added python3 packages
qboosh
qboosh at pld-linux.org
Sun Oct 29 10:08:39 CET 2023
commit aaae6ed4662609926c30d17e7c6b51e52324fce5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Oct 29 09:00:03 2023 +0100
- added python3 packages
python-Routes.spec | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
---
diff --git a/python-Routes.spec b/python-Routes.spec
index d8c9230..aac90b7 100644
--- a/python-Routes.spec
+++ b/python-Routes.spec
@@ -2,6 +2,8 @@
# Conditional build:
%bcond_without doc # Sphinx documentation
%bcond_without tests # unit and functional tests
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
Summary: Python package for mapping URLs to dicts and vice versa
Summary(pl.UTF-8): Pakiet Pythona do odwzorowywania URL-i na słowniki i odwrotnie
@@ -14,6 +16,7 @@ Group: Development/Languages/Python
Source0: https://files.pythonhosted.org/packages/source/R/Routes/Routes-%{version}.tar.gz
# Source0-md5: 8f1fab1924e00d11b14719a469a3e0a2
URL: https://pypi.org/project/Routes/
+%if %{with python2}
BuildRequires: python-devel >= 1:2.7
BuildRequires: python-setuptools >= 1:0.6-0.a11.1
%if %{with tests}
@@ -24,6 +27,19 @@ BuildRequires: python-six
BuildRequires: python-soupsieve < 2.0
BuildRequires: python-webtest
%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-devel >= 1:3.5
+BuildRequires: python3-setuptools >= 1:0.6-0.a11.1
+%if %{with tests}
+BuildRequires: python3-WebOb
+BuildRequires: python3-nose
+BuildRequires: python3-repoze.lru >= 0.3
+BuildRequires: python3-six
+BuildRequires: python3-soupsieve < 2.0
+BuildRequires: python3-webtest
+%endif
+%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
@@ -48,6 +64,24 @@ odwzorowywania URL-i na kontrolery/akcje i generowania URL-i. Routes
ułatwia tworzenie ładnych i zwięzłych URL-i, spokojnych przy
niewielkim wysiłku.
+%package -n python3-Routes
+Summary: Python package for mapping URLs to dicts and vice versa
+Summary(pl.UTF-8): Pakiet Pythona do odwzorowywania URL-i na słowniki i odwrotnie
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.5
+
+%description -n python3-Routes
+Routes is a Python re-implementation of the Rails routes system for
+mapping URLs to Controllers/Actions and generating URLs. Routes
+makes it easy to create pretty and concise URLs that are RESTful with
+little effort.
+
+%description -n python3-Routes -l pl.UTF-8
+Routes to pythonowa reimplementacja systemu przekierowań Rails do
+odwzorowywania URL-i na kontrolery/akcje i generowania URL-i. Routes
+ułatwia tworzenie ładnych i zwięzłych URL-i, spokojnych przy
+niewielkim wysiłku.
+
%package apidocs
Summary: API documentation for Python Routes module
Summary(pl.UTF-8): Dokumentacja API modułu Pythona Routes
@@ -63,7 +97,13 @@ Dokumentacja API modułu Pythona Routes.
%setup -q -n Routes-%{version}
%build
+%if %{with python2}
%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
%if %{with doc}
PYTHONPATH=$(pwd) \
@@ -74,18 +114,36 @@ PYTHONPATH=$(pwd) \
%install
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%py_install
%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/tests
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
%doc CHANGELOG.rst LICENSE.txt README.rst
%{py_sitescriptdir}/routes
%{py_sitescriptdir}/Routes-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-Routes
+%defattr(644,root,root,755)
+%doc CHANGELOG.rst LICENSE.txt README.rst
+%{py3_sitescriptdir}/routes
+%{py3_sitescriptdir}/Routes-%{version}-py*.egg-info
+%endif
%if %{with doc}
%files apidocs
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-Routes.git/commitdiff/aaae6ed4662609926c30d17e7c6b51e52324fce5
More information about the pld-cvs-commit
mailing list