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