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