]> git.pld-linux.org Git - packages/python-urllib3.git/blob - python-urllib3.spec
Version: 1.22
[packages/python-urllib3.git] / python-urllib3.spec
1 # TODO: use system six, [backports.]ssl_match_hostname
2 #
3 # Conditional build:
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.)
7 #
8 %define         module  urllib3
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}
12 Version:        1.22
13 Release:        1
14 License:        MIT
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/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 %if %{with tests}
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
27 # SO_REUSEPORT option
28 BuildRequires:  uname(release) >= 3.9
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules >= 1:3.2
33 %if %{with tests}
34 BuildRequires:  python3-PySocks >= 1.5.6
35 BuildRequires:  python3-PySocks < 2.0
36 BuildRequires:  python3-nose
37 BuildRequires:  python3-tornado
38 # SO_REUSEPORT option
39 BuildRequires:  uname(release) >= 3.9
40 %endif
41 %endif
42 BuildRequires:  rpm-pythonprov
43 BuildRequires:  rpmbuild(macros) >= 1.714
44 Requires:       python-modules >= 1:2.7
45 BuildArch:      noarch
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 Python 2 HTTP module with connection pooling and file POST abilities.
50 Features are:
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.
57
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.
67
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
73
74 %description -n python3-urllib3
75 Python 3 HTTP module with connection pooling and file POST abilities.
76 Features are:
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.
83
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.
93
94 %prep
95 %setup -q -n %{module}-%{version}
96
97 %build
98 %if %{with python2}
99 %py_build %{?with_tests:test}
100 %endif
101
102 %if %{with python3}
103 %py3_build %{?with_tests:test}
104 %endif
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108
109 %if %{with python2}
110 %py_install
111
112 # already in Python 2.7+
113 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/urllib3/packages/ordered_dict.py*
114 %py_postclean
115 %endif
116
117 %if %{with python3}
118 %py3_install
119
120 # already in Python 2.7+
121 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/urllib3/packages/{ordered_dict.py,__pycache__/ordered_dict.*.py*}
122 %endif
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %if %{with python2}
128 %files
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
133 %endif
134
135 %if %{with python3}
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
141 %endif
This page took 0.064812 seconds and 4 git commands to generate.