[packages/python-openid] python3 package (but code not ready for python3)
glen
glen at pld-linux.org
Wed Jun 22 12:03:03 CEST 2016
commit cfcb0943cace15bf66f8a231259795d06ef68a19
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Jun 22 13:02:30 2016 +0300
python3 package (but code not ready for python3)
python-openid.spec | 55 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 49 insertions(+), 6 deletions(-)
---
diff --git a/python-openid.spec b/python-openid.spec
index a6d9428..3659568 100644
--- a/python-openid.spec
+++ b/python-openid.spec
@@ -1,8 +1,11 @@
#
# Conditional build:
%bcond_without doc # don't build doc
+%bcond_without python2 # CPython 2.x module
+%bcond_with python3 # CPython 3.x module
-%define module openid
+%define module openid
+%define egg_name python_openid
Summary: OpenID consumer and server library for Python
Summary(pl.UTF-8): Biblioteka konsumenta i serwera OpenID dla Pythona
Name: python-%{module}
@@ -13,9 +16,17 @@ Group: Libraries/Python
Source0: https://github.com/openid/python-openid/archive/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 4f3c32944f7eef48e32fd36d185fa05c
URL: https://github.com/openid/python-openid
-BuildRequires: python >= 1:2.5
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires: python-modules
+BuildRequires: python >= 1:2.5
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-modules
+BuildRequires: python3-setuptools
+%endif
%if %{with doc}
BuildRequires: epydoc
%endif
@@ -30,6 +41,18 @@ OpenID consumer and server library for Python.
%description -l pl.UTF-8
Biblioteka konsumenta i serwera OpenID dla Pythona.
+%package -n python3-%{module}
+Summary: OpenID consumer and server library for Python
+Summary(pl.UTF-8): Biblioteka konsumenta i serwera OpenID dla Pythona
+Group: Libraries/Python
+Requires: python3-modules
+
+%description -n python3-%{module}
+OpenID consumer and server library for Python.
+
+%description -n python3-%{module} -l pl.UTF-8
+Biblioteka konsumenta i serwera OpenID dla Pythona.
+
%package apidocs
Summary: %{module} API documentation
Summary(pl.UTF-8): Dokumentacja API %{module}
@@ -45,27 +68,47 @@ Dokumentacja API %{module}.
%setup -q
%build
+%if %{with python2}
%py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
+
%if %{with doc}
sh admin/makedoc
%endif
%install
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%py_install
-
-%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
%doc README
%{py_sitescriptdir}/%{module}
-%{py_sitescriptdir}/python_openid-%{version}-py*.egg-info
+%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc README
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%endif
%if %{with doc}
%files apidocs
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-openid.git/commitdiff/cfcb0943cace15bf66f8a231259795d06ef68a19
More information about the pld-cvs-commit
mailing list