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