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