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