]> git.pld-linux.org Git - packages/python3-requests.git/blame - python3-requests.spec
up to 2.31.0
[packages/python3-requests.git] / python3-requests.spec
CommitLineData
ef9212ce 1#
8d099eee 2# Conditional build:
23351644 3%bcond_with tests # pytest tests (one test fails with pytest-httpbin 1.0.0)
dd9a8c31 4
44a39070 5%define urllib3_ver 1.21.1
dd9a8c31
ER
6%define module requests
7%define egg_name requests
594bc38a
AM
8Summary: HTTP library for Python
9Summary(pl.UTF-8): Biblioteka HTTP dla Pythona
10Name: python3-%{module}
3705b376 11Version: 2.31.0
d27cd286 12Release: 1
017795a9 13License: Apache v2.0
8ba13116 14Group: Development/Languages/Python
44a39070
JB
15#Source0Download: https://pypi.org/simple/requests/
16Source0: https://files.pythonhosted.org/packages/source/r/requests/%{module}-%{version}.tar.gz
3705b376 17# Source0-md5: 941e175c276cd7d39d098092c56679a4
0989c03f 18Patch0: system-cert.patch
594bc38a
AM
19Patch1: python-requests-reqs.patch
20Patch2: python-requests-disable-xdist.patch
23351644 21URL: https://docs.python-requests.org/
dd9a8c31
ER
22BuildRequires: rpm-pythonprov
23BuildRequires: rpmbuild(macros) >= 1.713
a5ef80ca 24BuildRequires: python3-modules >= 1:3.6
616851f8 25BuildRequires: python3-setuptools
017795a9 26%if %{with tests}
d04d981e 27BuildRequires: python3-PySocks >= 1.5.8
dd9a8c31 28BuildRequires: python3-certifi >= 2017.4.17
d27cd286
JB
29BuildRequires: python3-charset_normalizer >= 2
30BuildRequires: python3-charset_normalizer < 2.1
0989c03f 31BuildRequires: python3-idna >= 2.5
822dad3c 32BuildRequires: python3-idna < 4
0ecc0c85 33BuildRequires: python3-pytest >= 3
017795a9
JB
34BuildRequires: python3-pytest-cov
35BuildRequires: python3-pytest-httpbin >= 0.0.7
fa360ea6 36BuildRequires: python3-pytest-mock >= 2.0.0
d04d981e 37BuildRequires: python3-pytest-xdist
44a39070 38BuildRequires: python3-urllib3 >= %{urllib3_ver}
fa360ea6 39BuildRequires: python3-urllib3 < 1.27
017795a9 40%endif
a5ef80ca 41Requires: python3-modules >= 1:3.6
24e1d820 42Requires: python3-charset_normalizer >= 2
d04d981e
JB
43# for https
44Requires: python3-cryptography >= 1.3.4
24e1d820 45Requires: python3-idna >= 2.5
d04d981e 46Requires: python3-pyOpenSSL >= 0.14
ecc66759 47Requires: python3-urllib3 >= 1.22-2
dd9a8c31 48Suggests: ca-certificates
594bc38a
AM
49BuildArch: noarch
50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
a0c91a8e 51
594bc38a 52%description
a8d01621 53Requests is a HTTP library, written in Python, for human beings.
a0c91a8e
KK
54
55Most existing Python modules for sending HTTP requests are extremely
56verbose and cumbersome. Python's builtin urllib2 module provides most
594bc38a 57of the HTTP capabilities you should need, but the API is thoroughly
a0c91a8e 58broken. It requires an enormous amount of work (even method overrides)
8d099eee
JB
59to perform the simplest of tasks. Things shouldn't be this way. Not in
60Python.
61
ef9212ce
JB
62This package contains Python 3.x module.
63
594bc38a 64%description -l pl.UTF-8
a8d01621 65Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
a0c91a8e 66
a8d01621
ŁK
67Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
68zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
69zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
70wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
71najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
a0c91a8e 72
ef9212ce
JB
73Ten pakiet zawiera moduł dla Pythona 3.x.
74
8ba13116 75%prep
a8d01621 76%setup -q -n %{module}-%{version}
0989c03f 77%patch0 -p1
23351644
JB
78%patch1 -p1
79%patch2 -p1
e16ab944 80
8ba13116 81%build
23351644
JB
82%py3_build
83
9e2ed226 84%if %{with tests}
23351644
JB
85PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
86PYTEST_PLUGINS="pytest_httpbin.plugin,pytest_mock" \
87%{__python3} -m pytest tests
8d099eee 88%endif
8ba13116
MM
89
90%install
91rm -rf $RPM_BUILD_ROOT
a8d01621 92
b4dcbe07 93%py3_install
8ba13116
MM
94
95%clean
96rm -rf $RPM_BUILD_ROOT
97
98%files
99%defattr(644,root,root,755)
283f39fa 100%doc HISTORY.md README.md
a0c91a8e 101%{py3_sitescriptdir}/%{module}
dd9a8c31 102%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
This page took 0.076435 seconds and 4 git commands to generate.