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_with tests # test target (uses network etc.)
9 Summary: HTTP library with thread-safe connection pooling, file post, and more
10 Summary(pl.UTF-8): Biblioteka HTTP z bezpieczną wątkowo pulą połączeń, wysyłaniem plików itd.
11 Name: python-%{module}
15 Group: Development/Languages/Python
16 Source0: https://pypi.python.org/packages/ee/11/7c59620aceedcc1ef65e156cc5ce5a24ef87be4107c2b74458464e437a5d/urllib3-1.22.tar.gz
17 # Source0-md5: 0da7bed3fe94bf7dc59ae37885cc72f7
18 URL: http://urllib3.readthedocs.org/
20 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-PySocks >= 1.5.6
23 BuildRequires: python-PySocks < 2.0
24 BuildRequires: python-mock
25 BuildRequires: python-nose
26 BuildRequires: python-tornado
28 BuildRequires: uname(release) >= 3.9
32 BuildRequires: python3-modules >= 1:3.2
34 BuildRequires: python3-PySocks >= 1.5.6
35 BuildRequires: python3-PySocks < 2.0
36 BuildRequires: python3-nose
37 BuildRequires: python3-tornado
39 BuildRequires: uname(release) >= 3.9
42 BuildRequires: rpm-pythonprov
43 BuildRequires: rpmbuild(macros) >= 1.714
44 Requires: python-modules >= 1:2.7
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Python 2 HTTP module with connection pooling and file POST abilities.
51 - Re-use the same socket connection for multiple requests (with
52 optional client-side certificate verification).
53 - File posting (encode_multipart_formdata).
54 - Built-in redirection and retries (optional).
55 - Supports gzip and deflate decoding.
56 - Thread-safe and sanity-safe.
58 %description -l pl.UTF-8
59 Moduł HTTP dla Pythona 2 z pulą połączeń i możliwością wysyłania
60 plików metodą POST. Możliwości:
61 - używanie tego samego połączenia dla wielu żądań (z opcjonalną
62 weryfikacją certyfikatu po stronie klienta)
63 - wysyłanie plików (encode_multipart_formdata)
64 - wbudowane przekierowania i ponawianie prób (opcjonalne)
65 - obsługa kodowań gzip i deflate
66 - bezpieczeństwo względem wątków.
68 %package -n python3-urllib3
69 Summary: HTTP library with thread-safe connection pooling, file post, and more
70 Summary(pl.UTF-8): Biblioteka HTTP z bezpieczną wątkowo pulą połączeń, wysyłaniem plików itd.
71 Group: Development/Languages/Python
72 Requires: python3-modules >= 1:3.2
74 %description -n python3-urllib3
75 Python 3 HTTP module with connection pooling and file POST abilities.
77 - Re-use the same socket connection for multiple requests (with
78 optional client-side certificate verification).
79 - File posting (encode_multipart_formdata).
80 - Built-in redirection and retries (optional).
81 - Supports gzip and deflate decoding.
82 - Thread-safe and sanity-safe.
84 %description -n python3-urllib3 -l pl.UTF-8
85 Moduł HTTP dla Pythona 3 z pulą połączeń i możliwością wysyłania
86 plików metodą POST. Możliwości:
87 - używanie tego samego połączenia dla wielu żądań (z opcjonalną
88 weryfikacją certyfikatu po stronie klienta)
89 - wysyłanie plików (encode_multipart_formdata)
90 - wbudowane przekierowania i ponawianie prób (opcjonalne)
91 - obsługa kodowań gzip i deflate
92 - bezpieczeństwo względem wątków.
95 %setup -q -n %{module}-%{version}
99 %py_build %{?with_tests:test}
103 %py3_build %{?with_tests:test}
107 rm -rf $RPM_BUILD_ROOT
112 # already in Python 2.7+
113 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/urllib3/packages/ordered_dict.py*
120 # already in Python 2.7+
121 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/urllib3/packages/{ordered_dict.py,__pycache__/ordered_dict.*.py*}
125 rm -rf $RPM_BUILD_ROOT
129 %defattr(644,root,root,755)
130 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
131 %{py_sitescriptdir}/%{module}
132 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
136 %files -n python3-urllib3
137 %defattr(644,root,root,755)
138 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
139 %{py3_sitescriptdir}/%{module}
140 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info