]>
Commit | Line | Data |
---|---|---|
7e4c0b75 AM |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | ||
5 | %define module ndg-httpsclient | |
6 | Summary: Provides enhanced HTTPS support for httplib and urllib2 using PyOpenSSL | |
7 | Name: python-%{module} | |
8 | Version: 0.3.2 | |
9 | Release: 1 | |
10 | License: BSD | |
11 | Group: Libraries/Python | |
12 | Source0: https://pypi.python.org/packages/source/n/ndg-httpsclient/ndg_httpsclient-%{version}.tar.gz | |
13 | # Source0-md5: 076303c7aa0e41f3b45a7cb43dbb0743 | |
14 | URL: http://ndg-security.ceda.ac.uk/wiki/ndg_httpsclient | |
15 | BuildRequires: python-distribute | |
16 | BuildRequires: python-pyOpenSSL | |
17 | BuildRequires: rpm-pythonprov | |
18 | BuildRequires: rpmbuild(macros) >= 1.219 | |
19 | Requires: python-modules | |
20 | Requires: python-pyOpenSSL | |
21 | Requires: python-pyasn1 | |
22 | BuildArch: noarch | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | This is a HTTPS client implementation for httplib and urllib2 based on | |
27 | PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation | |
28 | over the default provided with Python and importantly enables full | |
29 | verification of the SSL peer. | |
30 | ||
31 | %prep | |
32 | %setup -q -n ndg_httpsclient-%{version} | |
33 | ||
34 | %build | |
35 | %{__python} setup.py build --build-base build-2 %{?with_tests:test} | |
36 | ||
37 | %install | |
38 | rm -rf $RPM_BUILD_ROOT | |
39 | ||
40 | %{__python} setup.py \ | |
41 | build --build-base build-2 \ | |
42 | install --skip-build \ | |
43 | --optimize=2 \ | |
44 | --root=$RPM_BUILD_ROOT | |
45 | ||
46 | %py_postclean | |
47 | ||
48 | %clean | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %files | |
52 | %defattr(644,root,root,755) | |
53 | %attr(755,root,root) %{_bindir}/ndg_httpclient | |
54 | %{py_sitescriptdir}/ndg | |
55 | %if "%{py_ver}" > "2.4" | |
56 | %{py_sitescriptdir}/ndg_httpsclient-%{version}-py*.egg-info | |
57 | %endif |