]>
Commit | Line | Data |
---|---|---|
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 |
8 | Summary: Enhanced HTTPS support for httplib and urllib2 using PyOpenSSL |
9 | Summary(pl.UTF-8): Rozszerzona obsługa HTTPS dla modułów httplib i urllib2 poprzez PyOpenSSL | |
7e4c0b75 | 10 | Name: python-%{module} |
97d009fc | 11 | Version: 0.4.2 |
a480d3fe | 12 | Release: 2 |
7e4c0b75 AM |
13 | License: BSD |
14 | Group: Libraries/Python | |
97d009fc AM |
15 | Source0: https://github.com/cedadev/ndg_httpsclient/archive/%{version}.tar.gz |
16 | # Source0-md5: 08236101a72bb18f9f62c123d199420b | |
7e4c0b75 | 17 | URL: http://ndg-security.ceda.ac.uk/wiki/ndg_httpsclient |
a480d3fe | 18 | %if %{with python2} |
7e4c0b75 AM |
19 | BuildRequires: python-distribute |
20 | BuildRequires: python-pyOpenSSL | |
a480d3fe AM |
21 | %endif |
22 | %if %{with python3} | |
23 | BuildRequires: python3-distribute | |
24 | BuildRequires: python3-pyOpenSSL | |
25 | %endif | |
7e4c0b75 | 26 | BuildRequires: rpm-pythonprov |
8c368b24 | 27 | BuildRequires: rpmbuild(macros) >= 1.710 |
7e4c0b75 AM |
28 | Requires: python-modules |
29 | Requires: python-pyOpenSSL | |
30 | Requires: python-pyasn1 | |
31 | BuildArch: noarch | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | This is a HTTPS client implementation for httplib and urllib2 based on | |
36 | PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation | |
37 | over the default provided with Python and importantly enables full | |
38 | verification of the SSL peer. | |
39 | ||
3b152d9f JB |
40 | %description -l pl.UTF-8 |
41 | Ten moduł to implementacja klienta HTTPS dla modułów httplib i urllib2 | |
42 | oparta na module PyOpenSSL. PyOpenSSL udostępnia pełniejszą | |
43 | implementację SSL niż domyślnie dostarczana z Pythonem i umożliwia | |
44 | pełną weryfikację drugiej strony połączenia SSL. | |
45 | ||
a480d3fe AM |
46 | %package -n python3-%{module} |
47 | Summary: Enhanced HTTPS support for httplib and urllib2 using PyOpenSSL | |
48 | Summary(pl.UTF-8): Rozszerzona obsługa HTTPS dla modułów httplib i urllib2 poprzez PyOpenSSL | |
49 | Group: Libraries/Python | |
50 | Requires: python3-modules | |
51 | Requires: python3-pyOpenSSL | |
52 | Requires: python3-pyasn1 | |
53 | ||
54 | %description -n python3-%{module} | |
55 | This is a HTTPS client implementation for httplib and urllib2 based on | |
56 | PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation | |
57 | over the default provided with Python and importantly enables full | |
58 | verification of the SSL peer. | |
59 | ||
60 | %description -n python3-%{module} -l pl.UTF-8 | |
61 | Ten moduł to implementacja klienta HTTPS dla modułów httplib i urllib2 | |
62 | oparta na module PyOpenSSL. PyOpenSSL udostępnia pełniejszą | |
63 | implementację SSL niż domyślnie dostarczana z Pythonem i umożliwia | |
64 | peł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 | |
79 | rm -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 | |
95 | rm -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 |