]> git.pld-linux.org Git - packages/python3-requests.git/blame - python-requests.spec
- up to 2.4.1
[packages/python3-requests.git] / python-requests.spec
CommitLineData
8d099eee 1# Conditional build:
a8d01621
ŁK
2%bcond_without python2 # build python 2 module
3%bcond_without python3 # build python 3 module
8d099eee 4#
8ba13116
MM
5%define module requests
6Summary: HTTP library for Python
8d099eee 7Summary(pl.UTF-8): Biblioteka HTTP dla Pythona
8ba13116 8Name: python-%{module}
9e57f9c2 9Version: 2.4.1
4a7ef446 10Release: 1
a8d01621 11License: Apache2
8ba13116 12Group: Development/Languages/Python
a8d01621 13Source0: https://pypi.python.org/packages/source/r/requests/%{module}-%{version}.tar.gz
9e57f9c2 14# Source0-md5: 931461f761c70708c46ea65b7889da58
a8d01621 15URL: http://python-requests.org
4a7ef446
ŁK
16Patch0: system-charade-and-urllib3.patch
17Patch1: system-cert.patch
a8d01621 18%if %{with python2}
4a7ef446 19BuildRequires: python-charade
a8d01621 20BuildRequires: python-modules >= 1:2.6
9e57f9c2 21BuildRequires: python-urllib3 >= 1.9.1
a8d01621
ŁK
22%endif
23%if %{with python3}
4a7ef446 24BuildRequires: python3-charade
a8d01621 25BuildRequires: python3-modules >= 3.2
9e57f9c2 26BuildRequires: python3-urllib3 >= 1.9.1
a8d01621 27%endif
8ba13116
MM
28BuildRequires: rpm-pythonprov
29BuildRequires: rpmbuild(macros) >= 1.219
4a7ef446
ŁK
30Requires: ca-certificates
31Requires: python-charade
a8d01621 32Requires: python-modules >= 1:2.6
9e57f9c2 33Requires: python-urllib3 >= 1.9.1
8ba13116
MM
34BuildArch: noarch
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
a8d01621 38Requests is a HTTP library, written in Python, for human beings.
8ba13116
MM
39
40Most existing Python modules for sending HTTP requests are extremely
41verbose and cumbersome. Python's builtin urllib2 module provides most
8d099eee 42of the HTTP capabilities you should need, but the API is thoroughly
8ba13116 43broken. It requires an enormous amount of work (even method overrides)
8d099eee
JB
44to perform the simplest of tasks. Things shouldn't be this way. Not in
45Python.
46
47%description -l pl.UTF-8
a8d01621 48Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
8ba13116 49
8d099eee
JB
50Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
51zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
52zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
53wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
54najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
8ba13116 55
a0c91a8e
KK
56%package -n python3-requests
57Summary: HTTP library, written in Python, for human beings
8d099eee 58Summary(pl.UTF-8): Biblioteka HTTP library napisana w Pythonie dla ludzi
a0c91a8e 59Group: Development/Languages/Python
4a7ef446
ŁK
60Requires: ca-certificates
61Requires: python3-charade
a8d01621 62Requires: python3-modules >= 3.2
9e57f9c2 63Requires: python3-urllib3 >= 1.9.1
a0c91a8e
KK
64
65%description -n python3-requests
a8d01621 66Requests is a HTTP library, written in Python, for human beings.
a0c91a8e
KK
67
68Most existing Python modules for sending HTTP requests are extremely
69verbose and cumbersome. Python's builtin urllib2 module provides most
70of the HTTP capabilities you should need, but the api is thoroughly
71broken. It requires an enormous amount of work (even method overrides)
8d099eee
JB
72to perform the simplest of tasks. Things shouldn't be this way. Not in
73Python.
74
75%description -n python3-requests -l pl.UTF-8
a8d01621 76Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
a0c91a8e 77
a8d01621
ŁK
78Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
79zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
80zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
81wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
82najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
a0c91a8e 83
8ba13116 84%prep
a8d01621 85%setup -q -n %{module}-%{version}
23ad999c 86%patch0 -p1
4a7ef446 87%patch1 -p1
e16ab944 88
8ba13116 89%build
a8d01621
ŁK
90%if %{with python2}
91%{__python} setup.py build -b py2
92%endif
a0c91a8e 93
a8d01621
ŁK
94%if %{with python3}
95%{__python3} setup.py build -b py3
8d099eee 96%endif
8ba13116
MM
97
98%install
99rm -rf $RPM_BUILD_ROOT
a8d01621
ŁK
100
101%if %{with python2}
a0c91a8e 102%{__python} setup.py \
a8d01621
ŁK
103 build -b py2 \
104 install \
8ba13116
MM
105 --skip-build \
106 --optimize=2 \
107 --root=$RPM_BUILD_ROOT
4a7ef446
ŁK
108%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
109%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
a8d01621
ŁK
110%py_postclean
111%endif
8ba13116 112
a8d01621 113%if %{with python3}
a0c91a8e 114%{__python3} setup.py \
a8d01621
ŁK
115 build -b py3 \
116 install \
117 --skip-build \
118 --optimize=2 \
119 --root=$RPM_BUILD_ROOT
120%endif
8ba13116 121
4a7ef446
ŁK
122%{__rm} -rf $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/{cacert.pem,packages}
123
8ba13116
MM
124%clean
125rm -rf $RPM_BUILD_ROOT
126
a8d01621 127%if %{with python2}
8ba13116
MM
128%files
129%defattr(644,root,root,755)
a8d01621 130%doc HISTORY.rst README.rst
8ba13116 131%{py_sitescriptdir}/%{module}
a8d01621 132%if "%{py_ver}" > "2.4"
8d099eee 133%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
a8d01621
ŁK
134%endif
135%endif
a0c91a8e 136
a8d01621 137%if %{with python3}
a0c91a8e
KK
138%files -n python3-requests
139%defattr(644,root,root,755)
a8d01621 140%doc HISTORY.rst README.rst
a0c91a8e 141%{py3_sitescriptdir}/%{module}
8d099eee 142%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
a8d01621 143%endif
This page took 0.312451 seconds and 4 git commands to generate.