[packages/python-ndg-httpsclient] - rel 3; python3 subpackage added
arekm
arekm at pld-linux.org
Sat Dec 31 18:21:05 CET 2016
commit a480d3fe9fae89630ea5ce372e098e254271a25f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Dec 31 18:20:57 2016 +0100
- rel 3; python3 subpackage added
python-ndg-httpsclient.spec | 56 +++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 54 insertions(+), 2 deletions(-)
---
diff --git a/python-ndg-httpsclient.spec b/python-ndg-httpsclient.spec
index 046b91b..4b626c9 100644
--- a/python-ndg-httpsclient.spec
+++ b/python-ndg-httpsclient.spec
@@ -1,20 +1,28 @@
#
# Conditional build:
%bcond_without tests # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
%define module ndg-httpsclient
Summary: Enhanced HTTPS support for httplib and urllib2 using PyOpenSSL
Summary(pl.UTF-8): Rozszerzona obsługa HTTPS dla modułów httplib i urllib2 poprzez PyOpenSSL
Name: python-%{module}
Version: 0.4.2
-Release: 1
+Release: 2
License: BSD
Group: Libraries/Python
Source0: https://github.com/cedadev/ndg_httpsclient/archive/%{version}.tar.gz
# Source0-md5: 08236101a72bb18f9f62c123d199420b
URL: http://ndg-security.ceda.ac.uk/wiki/ndg_httpsclient
+%if %{with python2}
BuildRequires: python-distribute
BuildRequires: python-pyOpenSSL
+%endif
+%if %{with python3}
+BuildRequires: python3-distribute
+BuildRequires: python3-pyOpenSSL
+%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.710
Requires: python-modules
@@ -35,24 +43,58 @@ oparta na module PyOpenSSL. PyOpenSSL udostępnia pełniejszą
implementację SSL niż domyślnie dostarczana z Pythonem i umożliwia
pełną weryfikację drugiej strony połączenia SSL.
+%package -n python3-%{module}
+Summary: Enhanced HTTPS support for httplib and urllib2 using PyOpenSSL
+Summary(pl.UTF-8): Rozszerzona obsługa HTTPS dla modułów httplib i urllib2 poprzez PyOpenSSL
+Group: Libraries/Python
+Requires: python3-modules
+Requires: python3-pyOpenSSL
+Requires: python3-pyasn1
+
+%description -n python3-%{module}
+This is a HTTPS client implementation for httplib and urllib2 based on
+PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
+over the default provided with Python and importantly enables full
+verification of the SSL peer.
+
+%description -n python3-%{module} -l pl.UTF-8
+Ten moduł to implementacja klienta HTTPS dla modułów httplib i urllib2
+oparta na module PyOpenSSL. PyOpenSSL udostępnia pełniejszą
+implementację SSL niż domyślnie dostarczana z Pythonem i umożliwia
+pełną weryfikację drugiej strony połączenia SSL.
+
%prep
%setup -q -n ndg_httpsclient-%{version}
%build
+%if %{with python2}
%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
%install
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%py_install
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
%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)
%attr(755,root,root) %{_bindir}/ndg_httpclient
@@ -61,3 +103,13 @@ rm -rf $RPM_BUILD_ROOT
%{py_sitescriptdir}/ndg_httpsclient-%{version}-py*.egg-info
%{py_sitescriptdir}/ndg_httpsclient-%{version}-py*-nspkg.pth
%endif
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%{py3_sitescriptdir}/ndg
+%{py3_sitescriptdir}/ndg_httpsclient-%{version}-py*.egg-info
+%{py3_sitescriptdir}/ndg_httpsclient-%{version}-py*-nspkg.pth
+%endif
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-ndg-httpsclient.git/commitdiff/a480d3fe9fae89630ea5ce372e098e254271a25f
More information about the pld-cvs-commit
mailing list