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