]> git.pld-linux.org Git - packages/python3-requests.git/blob - python-requests.spec
- updated to 2.13.0
[packages/python3-requests.git] / python-requests.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # test target (tests not included in dist tarball as of 2.13.0)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6 %bcond_without  bundled # bundled libraries
7 #
8 %define         urllib3ver      1.20
9 %define         module  requests
10 Summary:        HTTP library for Python 2
11 Summary(pl.UTF-8):      Biblioteka HTTP dla Pythona 2
12 Name:           python-%{module}
13 Version:        2.13.0
14 Release:        1
15 License:        Apache v2.0
16 Group:          Development/Languages/Python
17 Source0:        https://pypi.python.org/packages/16/09/37b69de7c924d318e51ece1c4ceb679bf93be9d05973bb30c35babd596e2/%{module}-%{version}.tar.gz
18 # Source0-md5:  921ec6b48f2ddafc8bb6160957baf444
19 Patch0:         %{name}-remove-nested-bundling-dep.patch
20 Patch1:         system-cert.patch
21 URL:            http://python-requests.org/
22 %if %{with python2}
23 BuildRequires:  python-modules >= 1:2.6
24 %if %{without bundled}
25 BuildRequires:  python-chardet >= 2.3.0
26 BuildRequires:  python-urllib3 >= %{urllib3ver}
27 %endif
28 %if %{with tests}
29 BuildRequires:  python-pytest >= 2.8.0
30 BuildRequires:  python-pytest-cov
31 BuildRequires:  python-pytest-httpbin >= 0.0.7
32 BuildRequires:  python-pytest-mock
33 %endif
34 %endif
35 %if %{with python3}
36 BuildRequires:  python3-modules >= 1:3.2
37 %if %{without bundled}
38 BuildRequires:  python3-chardet >= 2.3.0
39 BuildRequires:  python3-urllib3 >= %{urllib3ver}
40 %endif
41 %if %{with tests}
42 BuildRequires:  python3-pytest >= 2.8.0
43 BuildRequires:  python3-pytest-cov
44 BuildRequires:  python3-pytest-httpbin >= 0.0.7
45 BuildRequires:  python3-pytest-mock
46 %endif
47 %endif
48 BuildRequires:  rpm-pythonprov
49 BuildRequires:  rpmbuild(macros) >= 1.713
50 Requires:       ca-certificates
51 Requires:       python-idna >= 2.0.0
52 Requires:       python-modules >= 1:2.6
53 %if %{without bundled}
54 Requires:       python-chardet >= 2.3.0
55 Requires:       python-urllib3 >= %{urllib3ver}
56 %endif
57 # for python2 only to get SNI working. python3 doesn't need this
58 Requires:       python-ndg-httpsclient
59 Requires:       python-pyasn1
60 Requires:       python-pyOpenSSL >= 0.14
61 BuildArch:      noarch
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %description
65 Requests is a HTTP library, written in Python, for human beings.
66
67 Most existing Python modules for sending HTTP requests are extremely
68 verbose and cumbersome. Python's builtin urllib2 module provides most
69 of the HTTP capabilities you should need, but the API is thoroughly
70 broken. It requires an enormous amount of work (even method overrides)
71 to perform the simplest of tasks. Things shouldn't be this way. Not in
72 Python.
73
74 This package contains Python 2.x module.
75
76 %description -l pl.UTF-8
77 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
78
79 Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
80 zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
81 zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
82 wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
83 najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
84
85 Ten pakiet zawiera moduł dla Pythona 2.x.
86
87 %package -n python3-requests
88 Summary:        HTTP library for Python 3
89 Summary(pl.UTF-8):      Biblioteka HTTP dla Pythona 3
90 Group:          Development/Languages/Python
91 Requires:       ca-certificates
92 Requires:       python3-modules >= 1:3.2
93 %if %{without bundled}
94 Requires:       python3-chardet >= 2.3.0
95 Requires:       python3-idna >= 2.0.0
96 Requires:       python3-urllib3 >= %{urllib3ver}
97 %endif
98
99 %description -n python3-requests
100 Requests is a HTTP library, written in Python, for human beings.
101
102 Most existing Python modules for sending HTTP requests are extremely
103 verbose and cumbersome. Python's builtin urllib2 module provides most
104 of the HTTP capabilities you should need, but the api is thoroughly
105 broken. It requires an enormous amount of work (even method overrides)
106 to perform the simplest of tasks. Things shouldn't be this way. Not in
107 Python.
108
109 This package contains Python 3.x module.
110
111 %description -n python3-requests -l pl.UTF-8
112 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
113
114 Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
115 zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
116 zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
117 wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
118 najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
119
120 Ten pakiet zawiera moduł dla Pythona 3.x.
121
122 %prep
123 %setup -q -n %{module}-%{version}
124 %{!?with_bundled:%patch0 -p1}
125 %patch1 -p1
126
127 %build
128 %if %{with python2}
129 %py_build %{?with_tests:test}
130 %endif
131
132 %if %{with python3}
133 %py3_build %{?with_tests:test}
134 %endif
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138
139 %if %{with python2}
140 %py_install
141 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
142 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
143 %py_postclean
144 %endif
145
146 %if %{with python3}
147 %py3_install
148 %endif
149
150 %{__rm} $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/cacert.pem
151 %{!?with_bundled:%{__rm} -r $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/packages}
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %if %{with python2}
157 %files
158 %defattr(644,root,root,755)
159 %doc HISTORY.rst README.rst
160 %{py_sitescriptdir}/%{module}
161 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
162 %endif
163
164 %if %{with python3}
165 %files -n python3-requests
166 %defattr(644,root,root,755)
167 %doc HISTORY.rst README.rst
168 %{py3_sitescriptdir}/%{module}
169 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
170 %endif
This page took 0.109015 seconds and 4 git commands to generate.