]> git.pld-linux.org Git - packages/python-urllib3.git/blob - python-urllib3.spec
59684452167ebbe047a9531383f2973eb1db7c89
[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 %define         pypi_name       urllib3
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}
13 Version:        1.22
14 Release:        3
15 License:        MIT
16 Group:          Development/Languages/Python
17 Source0:        https://files.pythonhosted.org/packages/source/u/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
18 # Source0-md5:  0da7bed3fe94bf7dc59ae37885cc72f7
19 URL:            http://urllib3.readthedocs.org/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 %if %{with tests}
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
28 # SO_REUSEPORT option
29 BuildRequires:  uname(release) >= 3.9
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-modules >= 1:3.2
34 %if %{with tests}
35 BuildRequires:  python3-PySocks >= 1.5.6
36 BuildRequires:  python3-PySocks < 2.0
37 BuildRequires:  python3-nose
38 BuildRequires:  python3-tornado
39 # SO_REUSEPORT option
40 BuildRequires:  uname(release) >= 3.9
41 %endif
42 %endif
43 BuildRequires:  rpm-pythonprov
44 BuildRequires:  rpmbuild(macros) >= 1.714
45 Requires:       python-modules >= 1:2.7
46 BuildArch:      noarch
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 Python 2 HTTP module with connection pooling and file POST abilities.
51 Features are:
52 - Re-use the same socket connection for multiple requests (with
53   optional client-side certificate verification).
54 - File posting (encode_multipart_formdata).
55 - Built-in redirection and retries (optional).
56 - Supports gzip and deflate decoding.
57 - Thread-safe and sanity-safe.
58
59 %description -l pl.UTF-8
60 Moduł HTTP dla Pythona 2 z pulą połączeń i możliwością wysyłania
61 plików metodą POST. Możliwości:
62 - używanie tego samego połączenia dla wielu żądań (z opcjonalną
63   weryfikacją certyfikatu po stronie klienta)
64 - wysyłanie plików (encode_multipart_formdata)
65 - wbudowane przekierowania i ponawianie prób (opcjonalne)
66 - obsługa kodowań gzip i deflate
67 - bezpieczeństwo względem wątków.
68
69 %package -n python3-urllib3
70 Summary:        HTTP library with thread-safe connection pooling, file post, and more
71 Summary(pl.UTF-8):      Biblioteka HTTP z bezpieczną wątkowo pulą połączeń, wysyłaniem plików itd.
72 Group:          Development/Languages/Python
73 Requires:       python3-modules >= 1:3.2
74
75 %description -n python3-urllib3
76 Python 3 HTTP module with connection pooling and file POST abilities.
77 Features are:
78 - Re-use the same socket connection for multiple requests (with
79   optional client-side certificate verification).
80 - File posting (encode_multipart_formdata).
81 - Built-in redirection and retries (optional).
82 - Supports gzip and deflate decoding.
83 - Thread-safe and sanity-safe.
84
85 %description -n python3-urllib3 -l pl.UTF-8
86 Moduł HTTP dla Pythona 3 z pulą połączeń i możliwością wysyłania
87 plików metodą POST. Możliwości:
88 - używanie tego samego połączenia dla wielu żądań (z opcjonalną
89   weryfikacją certyfikatu po stronie klienta)
90 - wysyłanie plików (encode_multipart_formdata)
91 - wbudowane przekierowania i ponawianie prób (opcjonalne)
92 - obsługa kodowań gzip i deflate
93 - bezpieczeństwo względem wątków.
94
95 %prep
96 %setup -q -n %{module}-%{version}
97
98 %build
99 %if %{with python2}
100 %py_build %{?with_tests:test}
101 %endif
102
103 %if %{with python3}
104 %py3_build %{?with_tests:test}
105 %endif
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
110 %if %{with python2}
111 %py_install
112 %py_postclean
113 %endif
114
115 %if %{with python3}
116 %py3_install
117 %endif
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %if %{with python2}
123 %files
124 %defattr(644,root,root,755)
125 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
126 %{py_sitescriptdir}/%{module}
127 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
128 %endif
129
130 %if %{with python3}
131 %files -n python3-urllib3
132 %defattr(644,root,root,755)
133 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE.txt README.rst
134 %{py3_sitescriptdir}/%{module}
135 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
136 %endif
This page took 0.146957 seconds and 3 git commands to generate.