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 Source0: https://files.pythonhosted.org/packages/source/u/urllib3/%{module}-%{version}.tar.gz
18 # Source0-md5: 1ad43e4b5ab7a0794c89dc057e1d7179
19 URL: http://urllib3.readthedocs.org/
21 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-PySocks >= 1.5.6
24 BuildRequires: python-PySocks < 2.0
25 BuildRequires: python-mock
26 BuildRequires: python-nose
27 BuildRequires: python-tornado
29 BuildRequires: uname(release) >= 3.9
33 BuildRequires: python3-modules >= 1:3.4
35 BuildRequires: python3-PySocks >= 1.5.6
36 BuildRequires: python3-PySocks < 2.0
37 BuildRequires: python3-nose
38 BuildRequires: python3-tornado
40 BuildRequires: uname(release) >= 3.9
43 BuildRequires: rpm-pythonprov
44 BuildRequires: rpmbuild(macros) >= 1.714
46 BuildRequires: sphinx-pdg
48 Requires: python-modules >= 1:2.7
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 Python 2 HTTP module with connection pooling and file POST abilities.
55 - Re-use the same socket connection for multiple requests (with
56 optional client-side certificate verification).
57 - File posting (encode_multipart_formdata).
58 - Built-in redirection and retries (optional).
59 - Supports gzip and deflate decoding.
60 - Thread-safe and sanity-safe.
62 %description -l pl.UTF-8
63 Moduł HTTP dla Pythona 2 z pulą połączeń i możliwością wysyłania
64 plików metodą POST. Możliwości:
65 - używanie tego samego połączenia dla wielu żądań (z opcjonalną
66 weryfikacją certyfikatu po stronie klienta)
67 - wysyłanie plików (encode_multipart_formdata)
68 - wbudowane przekierowania i ponawianie prób (opcjonalne)
69 - obsługa kodowań gzip i deflate
70 - bezpieczeństwo względem wątków.
72 %package -n python3-urllib3
73 Summary: HTTP library with thread-safe connection pooling, file post, and more
74 Summary(pl.UTF-8): Biblioteka HTTP z bezpieczną wątkowo pulą połączeń, wysyłaniem plików itd.
75 Group: Development/Languages/Python
76 Requires: python3-modules >= 1:3.4
78 %description -n python3-urllib3
79 Python 3 HTTP module with connection pooling and file POST abilities.
81 - Re-use the same socket connection for multiple requests (with
82 optional client-side certificate verification).
83 - File posting (encode_multipart_formdata).
84 - Built-in redirection and retries (optional).
85 - Supports gzip and deflate decoding.
86 - Thread-safe and sanity-safe.
88 %description -n python3-urllib3 -l pl.UTF-8
89 Moduł HTTP dla Pythona 3 z pulą połączeń i możliwością wysyłania
90 plików metodą POST. Możliwości:
91 - używanie tego samego połączenia dla wielu żądań (z opcjonalną
92 weryfikacją certyfikatu po stronie klienta)
93 - wysyłanie plików (encode_multipart_formdata)
94 - wbudowane przekierowania i ponawianie prób (opcjonalne)
95 - obsługa kodowań gzip i deflate
96 - bezpieczeństwo względem wątków.
99 Summary: API documentation for Python urllib3 module
100 Summary(pl.UTF-8): Dokumentacja API modułu Pythona urllib3
104 API documentation for Python urllib3 module.
106 %description apidocs -l pl.UTF-8
107 Dokumentacja API modułu Pythona urllib3.
110 %setup -q -n %{module}-%{version}
114 %py_build %{?with_tests:test}
118 %py3_build %{?with_tests:test}
122 %{__make} -C docs html
126 rm -rf $RPM_BUILD_ROOT
138 rm -rf $RPM_BUILD_ROOT
142 %defattr(644,root,root,755)
143 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
144 %{py_sitescriptdir}/%{module}
145 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
149 %files -n python3-urllib3
150 %defattr(644,root,root,755)
151 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
152 %{py3_sitescriptdir}/%{module}
153 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
158 %defattr(644,root,root,755)
159 %doc docs/_build/html/{_static,reference,*.html,*.js}