1 # TODO: use system six, [backports.]ssl_match_hostname
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
6 %bcond_without doc # Sphinx documentation
7 %bcond_with tests # test target (uses network etc.)
10 Summary: HTTP library with thread-safe connection pooling, file post, and more
11 Summary(pl.UTF-8): Biblioteka HTTP z bezpieczną wątkowo pulą połączeń, wysyłaniem plików itd.
12 Name: python-%{module}
16 Group: Development/Languages/Python
17 #Source0Download: https://pypi.org/simple/urllib3/
18 Source0: https://files.pythonhosted.org/packages/source/u/urllib3/%{module}-%{version}.tar.gz
19 # Source0-md5: f3d8b1841539200c949a33e87e551d8e
20 Patch0: %{name}-mock.patch
21 URL: http://urllib3.readthedocs.org/
23 BuildRequires: python-modules >= 1:2.7
25 BuildRequires: python-PySocks >= 1.5.6
26 BuildRequires: python-PySocks < 2.0
27 BuildRequires: python-mock
28 BuildRequires: python-nose
29 BuildRequires: python-tornado
31 BuildRequires: uname(release) >= 3.9
35 BuildRequires: python3-modules >= 1:3.4
37 BuildRequires: python3-PySocks >= 1.5.6
38 BuildRequires: python3-PySocks < 2.0
39 BuildRequires: python3-nose
40 BuildRequires: python3-tornado
42 BuildRequires: uname(release) >= 3.9
45 BuildRequires: rpm-pythonprov
46 BuildRequires: rpmbuild(macros) >= 1.714
48 BuildRequires: sphinx-pdg-3
50 Requires: python-modules >= 1:2.7
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 Python 2 HTTP module with connection pooling and file POST abilities.
57 - Re-use the same socket connection for multiple requests (with
58 optional client-side certificate verification).
59 - File posting (encode_multipart_formdata).
60 - Built-in redirection and retries (optional).
61 - Supports gzip and deflate decoding.
62 - Thread-safe and sanity-safe.
64 %description -l pl.UTF-8
65 Moduł HTTP dla Pythona 2 z pulą połączeń i możliwością wysyłania
66 plików metodą POST. Możliwości:
67 - używanie tego samego połączenia dla wielu żądań (z opcjonalną
68 weryfikacją certyfikatu po stronie klienta)
69 - wysyłanie plików (encode_multipart_formdata)
70 - wbudowane przekierowania i ponawianie prób (opcjonalne)
71 - obsługa kodowań gzip i deflate
72 - bezpieczeństwo względem wątków.
74 %package -n python3-urllib3
75 Summary: HTTP library with thread-safe connection pooling, file post, and more
76 Summary(pl.UTF-8): Biblioteka HTTP z bezpieczną wątkowo pulą połączeń, wysyłaniem plików itd.
77 Group: Development/Languages/Python
78 Requires: python3-modules >= 1:3.4
80 %description -n python3-urllib3
81 Python 3 HTTP module with connection pooling and file POST abilities.
83 - Re-use the same socket connection for multiple requests (with
84 optional client-side certificate verification).
85 - File posting (encode_multipart_formdata).
86 - Built-in redirection and retries (optional).
87 - Supports gzip and deflate decoding.
88 - Thread-safe and sanity-safe.
90 %description -n python3-urllib3 -l pl.UTF-8
91 Moduł HTTP dla Pythona 3 z pulą połączeń i możliwością wysyłania
92 plików metodą POST. Możliwości:
93 - używanie tego samego połączenia dla wielu żądań (z opcjonalną
94 weryfikacją certyfikatu po stronie klienta)
95 - wysyłanie plików (encode_multipart_formdata)
96 - wbudowane przekierowania i ponawianie prób (opcjonalne)
97 - obsługa kodowań gzip i deflate
98 - bezpieczeństwo względem wątków.
101 Summary: API documentation for Python urllib3 module
102 Summary(pl.UTF-8): Dokumentacja API modułu Pythona urllib3
106 API documentation for Python urllib3 module.
108 %description apidocs -l pl.UTF-8
109 Dokumentacja API modułu Pythona urllib3.
112 %setup -q -n %{module}-%{version}
117 %py_build %{?with_tests:test}
121 %py3_build %{?with_tests:test}
125 %{__make} -C docs html \
126 SPHINXBUILD=sphinx-build-3 \
131 rm -rf $RPM_BUILD_ROOT
143 rm -rf $RPM_BUILD_ROOT
147 %defattr(644,root,root,755)
148 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
149 %{py_sitescriptdir}/%{module}
150 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
154 %files -n python3-urllib3
155 %defattr(644,root,root,755)
156 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
157 %{py3_sitescriptdir}/%{module}
158 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
163 %defattr(644,root,root,755)
164 %doc docs/_build/html/{_static,reference,*.html,*.js}