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