2 # - bundled external libs? packages/ contains:
7 %bcond_without python2 # build python 2 module
8 %bcond_without python3 # build python 3 module
10 %define module requests
11 Summary: HTTP library for Python
12 Summary(pl.UTF-8): Biblioteka HTTP dla Pythona
13 Name: python-%{module}
17 Group: Development/Languages/Python
18 Source0: https://pypi.python.org/packages/source/r/requests/%{module}-%{version}.tar.gz
19 # Source0-md5: adbd3f18445f7fe5e77f65c502e264fb
20 URL: http://python-requests.org
22 BuildRequires: python-modules >= 1:2.6
25 BuildRequires: python3-modules >= 3.2
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.219
29 Requires: python-modules >= 1:2.6
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Requests is a HTTP library, written in Python, for human beings.
36 Most existing Python modules for sending HTTP requests are extremely
37 verbose and cumbersome. Python's builtin urllib2 module provides most
38 of the HTTP capabilities you should need, but the API is thoroughly
39 broken. It requires an enormous amount of work (even method overrides)
40 to perform the simplest of tasks. Things shouldn't be this way. Not in
43 %description -l pl.UTF-8
44 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
46 Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
47 zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
48 zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
49 wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
50 najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
52 %package -n python3-requests
53 Summary: HTTP library, written in Python, for human beings
54 Summary(pl.UTF-8): Biblioteka HTTP library napisana w Pythonie dla ludzi
55 Group: Development/Languages/Python
56 Requires: python3-modules >= 3.2
58 %description -n python3-requests
59 Requests is a HTTP library, written in Python, for human beings.
61 Most existing Python modules for sending HTTP requests are extremely
62 verbose and cumbersome. Python's builtin urllib2 module provides most
63 of the HTTP capabilities you should need, but the api is thoroughly
64 broken. It requires an enormous amount of work (even method overrides)
65 to perform the simplest of tasks. Things shouldn't be this way. Not in
68 %description -n python3-requests -l pl.UTF-8
69 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
71 Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
72 zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
73 zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
74 wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
75 najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
78 %setup -q -n %{module}-%{version}
82 %{__python} setup.py build -b py2
86 %{__python3} setup.py build -b py3
90 rm -rf $RPM_BUILD_ROOT
93 %{__python} setup.py \
98 --root=$RPM_BUILD_ROOT
99 %py_ocomp $RPM_BUILD_ROOT%%{py_sitescriptdir}
100 %py_comp $RPM_BUILD_ROOT%%{py_sitescriptdir}
105 %{__python3} setup.py \
110 --root=$RPM_BUILD_ROOT
114 rm -rf $RPM_BUILD_ROOT
118 %defattr(644,root,root,755)
119 %doc HISTORY.rst README.rst
120 %{py_sitescriptdir}/%{module}
121 %if "%{py_ver}" > "2.4"
122 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
127 %files -n python3-requests
128 %defattr(644,root,root,755)
129 %doc HISTORY.rst README.rst
130 %{py3_sitescriptdir}/%{module}
131 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info