]> git.pld-linux.org Git - packages/python3-requests.git/blame - python-requests.spec
- updated to 2.13.0
[packages/python3-requests.git] / python-requests.spec
CommitLineData
ef9212ce 1#
8d099eee 2# Conditional build:
017795a9 3%bcond_with tests # test target (tests not included in dist tarball as of 2.13.0)
ef9212ce
JB
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
c29b18ec 6%bcond_without bundled # bundled libraries
8d099eee 7#
017795a9 8%define urllib3ver 1.20
8ba13116 9%define module requests
ef9212ce
JB
10Summary: HTTP library for Python 2
11Summary(pl.UTF-8): Biblioteka HTTP dla Pythona 2
8ba13116 12Name: python-%{module}
017795a9
JB
13Version: 2.13.0
14Release: 1
15License: Apache v2.0
8ba13116 16Group: Development/Languages/Python
017795a9
JB
17Source0: https://pypi.python.org/packages/16/09/37b69de7c924d318e51ece1c4ceb679bf93be9d05973bb30c35babd596e2/%{module}-%{version}.tar.gz
18# Source0-md5: 921ec6b48f2ddafc8bb6160957baf444
19Patch0: %{name}-remove-nested-bundling-dep.patch
4a7ef446 20Patch1: system-cert.patch
017795a9 21URL: http://python-requests.org/
a8d01621
ŁK
22%if %{with python2}
23BuildRequires: python-modules >= 1:2.6
27c2bafe 24%if %{without bundled}
017795a9 25BuildRequires: python-chardet >= 2.3.0
d49507cd 26BuildRequires: python-urllib3 >= %{urllib3ver}
a8d01621 27%endif
017795a9
JB
28%if %{with tests}
29BuildRequires: python-pytest >= 2.8.0
30BuildRequires: python-pytest-cov
31BuildRequires: python-pytest-httpbin >= 0.0.7
32BuildRequires: python-pytest-mock
33%endif
27c2bafe 34%endif
a8d01621 35%if %{with python3}
ef9212ce 36BuildRequires: python3-modules >= 1:3.2
27c2bafe 37%if %{without bundled}
017795a9 38BuildRequires: python3-chardet >= 2.3.0
d49507cd 39BuildRequires: python3-urllib3 >= %{urllib3ver}
a8d01621 40%endif
017795a9
JB
41%if %{with tests}
42BuildRequires: python3-pytest >= 2.8.0
43BuildRequires: python3-pytest-cov
44BuildRequires: python3-pytest-httpbin >= 0.0.7
45BuildRequires: python3-pytest-mock
46%endif
27c2bafe 47%endif
8ba13116 48BuildRequires: rpm-pythonprov
b4dcbe07 49BuildRequires: rpmbuild(macros) >= 1.713
4a7ef446 50Requires: ca-certificates
017795a9 51Requires: python-idna >= 2.0.0
a8d01621 52Requires: python-modules >= 1:2.6
27c2bafe 53%if %{without bundled}
017795a9 54Requires: python-chardet >= 2.3.0
d49507cd 55Requires: python-urllib3 >= %{urllib3ver}
27c2bafe 56%endif
e7d50ac0
AM
57# for python2 only to get SNI working. python3 doesn't need this
58Requires: python-ndg-httpsclient
59Requires: python-pyasn1
017795a9 60Requires: python-pyOpenSSL >= 0.14
8ba13116
MM
61BuildArch: noarch
62BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64%description
a8d01621 65Requests is a HTTP library, written in Python, for human beings.
8ba13116
MM
66
67Most existing Python modules for sending HTTP requests are extremely
68verbose and cumbersome. Python's builtin urllib2 module provides most
8d099eee 69of the HTTP capabilities you should need, but the API is thoroughly
8ba13116 70broken. It requires an enormous amount of work (even method overrides)
8d099eee
JB
71to perform the simplest of tasks. Things shouldn't be this way. Not in
72Python.
73
ef9212ce
JB
74This package contains Python 2.x module.
75
8d099eee 76%description -l pl.UTF-8
a8d01621 77Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
8ba13116 78
8d099eee
JB
79Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
80zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
81zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
82wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
83najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
8ba13116 84
ef9212ce
JB
85Ten pakiet zawiera moduł dla Pythona 2.x.
86
a0c91a8e 87%package -n python3-requests
ef9212ce
JB
88Summary: HTTP library for Python 3
89Summary(pl.UTF-8): Biblioteka HTTP dla Pythona 3
a0c91a8e 90Group: Development/Languages/Python
4a7ef446 91Requires: ca-certificates
ef9212ce 92Requires: python3-modules >= 1:3.2
27c2bafe 93%if %{without bundled}
017795a9
JB
94Requires: python3-chardet >= 2.3.0
95Requires: python3-idna >= 2.0.0
d49507cd 96Requires: python3-urllib3 >= %{urllib3ver}
27c2bafe 97%endif
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}
27c2bafe 124%{!?with_bundled:%patch0 -p1}
4a7ef446 125%patch1 -p1
e16ab944 126
8ba13116 127%build
a8d01621 128%if %{with python2}
b4dcbe07 129%py_build %{?with_tests:test}
a8d01621 130%endif
a0c91a8e 131
a8d01621 132%if %{with python3}
b4dcbe07 133%py3_build %{?with_tests:test}
8d099eee 134%endif
8ba13116
MM
135
136%install
137rm -rf $RPM_BUILD_ROOT
a8d01621
ŁK
138
139%if %{with python2}
b4dcbe07 140%py_install
4a7ef446
ŁK
141%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
142%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
a8d01621
ŁK
143%py_postclean
144%endif
8ba13116 145
a8d01621 146%if %{with python3}
b4dcbe07 147%py3_install
a8d01621 148%endif
8ba13116 149
ae797189
JB
150%{__rm} $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/cacert.pem
151%{!?with_bundled:%{__rm} -r $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/packages}
4a7ef446 152
8ba13116
MM
153%clean
154rm -rf $RPM_BUILD_ROOT
155
a8d01621 156%if %{with python2}
8ba13116
MM
157%files
158%defattr(644,root,root,755)
a8d01621 159%doc HISTORY.rst README.rst
8ba13116 160%{py_sitescriptdir}/%{module}
8d099eee 161%{py_sitescriptdir}/%{module}-%{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)
a8d01621 167%doc HISTORY.rst README.rst
a0c91a8e 168%{py3_sitescriptdir}/%{module}
8d099eee 169%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
a8d01621 170%endif
This page took 0.09203 seconds and 4 git commands to generate.