]> git.pld-linux.org Git - packages/python-ndg-httpsclient.git/blame - python-ndg-httpsclient.spec
- rel 3; python3 subpackage added
[packages/python-ndg-httpsclient.git] / python-ndg-httpsclient.spec
CommitLineData
7e4c0b75
AM
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
a480d3fe
AM
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
7e4c0b75
AM
6
7%define module ndg-httpsclient
3b152d9f
JB
8Summary: Enhanced HTTPS support for httplib and urllib2 using PyOpenSSL
9Summary(pl.UTF-8): Rozszerzona obsługa HTTPS dla modułów httplib i urllib2 poprzez PyOpenSSL
7e4c0b75 10Name: python-%{module}
97d009fc 11Version: 0.4.2
a480d3fe 12Release: 2
7e4c0b75
AM
13License: BSD
14Group: Libraries/Python
97d009fc
AM
15Source0: https://github.com/cedadev/ndg_httpsclient/archive/%{version}.tar.gz
16# Source0-md5: 08236101a72bb18f9f62c123d199420b
7e4c0b75 17URL: http://ndg-security.ceda.ac.uk/wiki/ndg_httpsclient
a480d3fe 18%if %{with python2}
7e4c0b75
AM
19BuildRequires: python-distribute
20BuildRequires: python-pyOpenSSL
a480d3fe
AM
21%endif
22%if %{with python3}
23BuildRequires: python3-distribute
24BuildRequires: python3-pyOpenSSL
25%endif
7e4c0b75 26BuildRequires: rpm-pythonprov
8c368b24 27BuildRequires: rpmbuild(macros) >= 1.710
7e4c0b75
AM
28Requires: python-modules
29Requires: python-pyOpenSSL
30Requires: python-pyasn1
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35This is a HTTPS client implementation for httplib and urllib2 based on
36PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
37over the default provided with Python and importantly enables full
38verification of the SSL peer.
39
3b152d9f
JB
40%description -l pl.UTF-8
41Ten moduł to implementacja klienta HTTPS dla modułów httplib i urllib2
42oparta na module PyOpenSSL. PyOpenSSL udostępnia pełniejszą
43implementację SSL niż domyślnie dostarczana z Pythonem i umożliwia
44pełną weryfikację drugiej strony połączenia SSL.
45
a480d3fe
AM
46%package -n python3-%{module}
47Summary: Enhanced HTTPS support for httplib and urllib2 using PyOpenSSL
48Summary(pl.UTF-8): Rozszerzona obsługa HTTPS dla modułów httplib i urllib2 poprzez PyOpenSSL
49Group: Libraries/Python
50Requires: python3-modules
51Requires: python3-pyOpenSSL
52Requires: python3-pyasn1
53
54%description -n python3-%{module}
55This is a HTTPS client implementation for httplib and urllib2 based on
56PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
57over the default provided with Python and importantly enables full
58verification of the SSL peer.
59
60%description -n python3-%{module} -l pl.UTF-8
61Ten moduł to implementacja klienta HTTPS dla modułów httplib i urllib2
62oparta na module PyOpenSSL. PyOpenSSL udostępnia pełniejszą
63implementację SSL niż domyślnie dostarczana z Pythonem i umożliwia
64pełną weryfikację drugiej strony połączenia SSL.
65
7e4c0b75
AM
66%prep
67%setup -q -n ndg_httpsclient-%{version}
68
69%build
a480d3fe 70%if %{with python2}
d200588e 71%py_build %{?with_tests:test}
a480d3fe
AM
72%endif
73
74%if %{with python3}
75%py3_build %{?with_tests:test}
76%endif
7e4c0b75
AM
77
78%install
79rm -rf $RPM_BUILD_ROOT
80
a480d3fe 81%if %{with python2}
d200588e 82%py_install
7e4c0b75 83
df64dd2a 84%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
a480d3fe
AM
85%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
86
7e4c0b75 87%py_postclean
a480d3fe
AM
88%endif
89
90%if %{with python3}
91%py3_install
92%endif
7e4c0b75
AM
93
94%clean
95rm -rf $RPM_BUILD_ROOT
96
a480d3fe 97%if %{with python2}
7e4c0b75
AM
98%files
99%defattr(644,root,root,755)
100%attr(755,root,root) %{_bindir}/ndg_httpclient
101%{py_sitescriptdir}/ndg
102%if "%{py_ver}" > "2.4"
103%{py_sitescriptdir}/ndg_httpsclient-%{version}-py*.egg-info
df64dd2a 104%{py_sitescriptdir}/ndg_httpsclient-%{version}-py*-nspkg.pth
7e4c0b75 105%endif
a480d3fe
AM
106%endif
107
108%if %{with python3}
109%files -n python3-%{module}
110%defattr(644,root,root,755)
111%{py3_sitescriptdir}/ndg
112%{py3_sitescriptdir}/ndg_httpsclient-%{version}-py*.egg-info
113%{py3_sitescriptdir}/ndg_httpsclient-%{version}-py*-nspkg.pth
114%endif
115
This page took 0.06975 seconds and 4 git commands to generate.