]> git.pld-linux.org Git - packages/python-httplib2.git/blame - python-httplib2.spec
- updated to 0.18.1 (CRLF injection fix)
[packages/python-httplib2.git] / python-httplib2.spec
CommitLineData
dd8b4942
JR
1#
2# Conditional build:
ebcdddb2 3%bcond_without python2 # Python 2.x module
dd8b4942 4%bcond_without python3 # Python 3.x module
ebcdddb2
JB
5%bcond_without doc # Sphinx documentation
6%bcond_without tests # unit tests
dd8b4942 7
2f9adc1a 8Summary: A comprehensive HTTP client library
190dfc00 9Summary(pl.UTF-8): Obszerna biblioteka klienta HTTP
2f9adc1a 10Name: python-httplib2
408d9902 11Version: 0.18.1
8625bb39 12Release: 1
2f9adc1a
ER
13License: MIT
14Group: Development/Languages/Python
ebcdddb2 15#Source0Download: https://github.com/httplib2/httplib2/releases
408d9902
JB
16Source0: https://github.com/httplib2/httplib2/archive/v%{version}/httplib2-%{version}.tar.gz
17# Source0-md5: 883f17828619757836ff510c42a7cca8
5007a437 18Patch0: %{name}.certfile.patch
b9a87db1 19Patch1: %{name}-0.9-proxy-http.patch
ebcdddb2 20Patch2: %{name}-mock.patch
5007a437 21URL: https://github.com/httplib2/httplib2
ebcdddb2
JB
22%if %{with python2}
23BuildRequires: python-modules >= 1:2.7
24BuildRequires: python-setuptools
25%if %{with tests}
26BuildRequires: python-future >= 0.16.0
27BuildRequires: python-mock >= 2.0.0
28BuildRequires: python-pytest >= 3.2.1
29BuildRequires: python-pytest-cov >= 2.5.1
30BuildRequires: python-pytest-timeout >= 1.2.0
31BuildRequires: python-six >= 1.10.0
32%endif
33%endif
dd8b4942 34%if %{with python3}
ebcdddb2
JB
35BuildRequires: python3-modules >= 1:3.4
36BuildRequires: python3-setuptools
37%if %{with tests}
38BuildRequires: python3-pytest >= 3.2.1
39BuildRequires: python3-pytest-cov >= 2.5.1
40BuildRequires: python3-pytest-timeout >= 1.2.0
41BuildRequires: python3-six >= 1.10.0
42%endif
dd8b4942 43%endif
a725a8a2 44BuildRequires: rpm-pythonprov
ebcdddb2
JB
45BuildRequires: rpmbuild(macros) >= 1.710
46%if %{with doc}
47BuildRequires: sphinx-pdg
48%endif
5007a437 49Requires: ca-certificates
2f9adc1a
ER
50BuildArch: noarch
51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53%description
54A comprehensive HTTP client library, httplib2.py supports many
190dfc00 55features left out of other HTTP libraries. Supports:
2f9adc1a
ER
56- HTTP and HTTPS
57- Keep-Alive
58- Authentication
59- Caching
60- All Methods
61- Redirects
62- Compression
63- Lost update support
64- Unit Tested
65
190dfc00
JB
66%description -l pl.UTF-8
67httplib2.py to obszerna biblioteka klienta HTTP, obsługująca wiele
68cech pomijanych przez inne biblioteki. Obsługuje:
69- HTTP i HTTPS
70- Keep-Alive
71- uwierzytelnianie
72- buforowanie
73- wszystkie metody
74- przekierowania
75- kompresję
76- Lost update
77- podlega testom jednostkowym.
78
dd8b4942
JR
79%package -n python3-httplib2
80Summary: A comprehensive HTTP client library
81Summary(pl.UTF-8): Obszerna biblioteka klienta HTTP
82Group: Development/Languages/Python
ebcdddb2 83Requires: ca-certificates
dd8b4942
JR
84
85%description -n python3-httplib2
86A comprehensive HTTP client library, httplib2.py supports many
87features left out of other HTTP libraries. Supports:
88- HTTP and HTTPS
89- Keep-Alive
90- Authentication
91- Caching
92- All Methods
93- Redirects
94- Compression
95- Lost update support
96- Unit Tested
97
98%description -n python3-httplib2 -l pl.UTF-8
99httplib2.py to obszerna biblioteka klienta HTTP, obsługująca wiele
100cech pomijanych przez inne biblioteki. Obsługuje:
101- HTTP i HTTPS
102- Keep-Alive
103- uwierzytelnianie
104- buforowanie
105- wszystkie metody
106- przekierowania
107- kompresję
108- Lost update
109- podlega testom jednostkowym.
110
2f9adc1a
ER
111%prep
112%setup -q -n httplib2-%{version}
5007a437
AM
113%patch0 -p1
114%patch1 -p1
ebcdddb2 115%patch2 -p1
2f9adc1a 116
af4b3757 117%build
ebcdddb2 118%if %{with python2}
af4b3757
JK
119%py_build
120
ebcdddb2
JB
121%if %{with tests}
122PYTHONPATH=$(pwd)/build-2/lib \
123%{__python} -m pytest tests -k 'not test_certs_file_from_builtin and not test_certs_file_from_environment and not test_with_certifi_removed_from_modules and not test_noproxy_star'
124%endif
125%endif
126
dd8b4942 127%if %{with python3}
af4b3757 128%py3_build
ebcdddb2
JB
129
130%if %{with tests}
131# in python3 implementation system socks module is preferred over httplib2.socks, and the first is incompatible with test_socks5_auth
132PYTHONPATH=$(pwd)/build-3/lib \
133%{__python3} -m pytest tests -k 'not test_certs_file_from_builtin and not test_certs_file_from_environment and not test_with_certifi_removed_from_modules and not test_noproxy_star and not test_server_not_found_error_is_raised_for_invalid_hostname and not test_socks5_auth'
134%endif
135%endif
136
137%if %{with doc}
138%{__make} -C doc html
dd8b4942
JR
139%endif
140
2f9adc1a
ER
141%install
142rm -rf $RPM_BUILD_ROOT
ebcdddb2
JB
143
144%if %{with python2}
af4b3757 145%py_install
ebcdddb2
JB
146
147%py_postclean
148%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/httplib2/cacerts.txt
149%endif
dd8b4942
JR
150
151%if %{with python3}
af4b3757 152%py3_install
2f9adc1a 153
ebcdddb2
JB
154%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/httplib2/cacerts.txt
155%endif
2f9adc1a
ER
156
157%clean
158rm -rf $RPM_BUILD_ROOT
159
ebcdddb2 160%if %{with python2}
2f9adc1a
ER
161%files
162%defattr(644,root,root,755)
ebcdddb2 163%doc CHANGELOG LICENSE README.md
dd8b4942
JR
164%{py_sitescriptdir}/httplib2
165%{py_sitescriptdir}/httplib2-%{version}-py*.egg-info
ebcdddb2 166%endif
dd8b4942 167
5007a437 168%if %{with python3}
dd8b4942
JR
169%files -n python3-httplib2
170%defattr(644,root,root,755)
ebcdddb2 171%doc CHANGELOG LICENSE README.md python3/README
dd8b4942
JR
172%{py3_sitescriptdir}/httplib2
173%{py3_sitescriptdir}/httplib2-%{version}-py*.egg-info
5007a437 174%endif
This page took 0.122842 seconds and 4 git commands to generate.