]>
Commit | Line | Data |
---|---|---|
8ba13116 MM |
1 | %define module requests |
2 | Summary: HTTP library for Python | |
3 | Name: python-%{module} | |
4 | Version: 0.13.3 | |
5 | %define _verinternal 0.13.2 | |
6 | %define _relstr 11-g52b55cc | |
7 | Release: 0.1 | |
8 | License: ISC | |
9 | Group: Development/Languages/Python | |
10 | Source0: https://github.com/kennethreitz/requests/tarball/develop/kennethreitz-%{module}-v%{version}-%{_relstr}.tar.gz | |
11 | # Source0-md5: 083bd0d48b75d2ab79f2636f5bb204fc | |
12 | URL: https://github.com/kennethreitz/requests | |
13 | BuildRequires: rpm-pythonprov | |
14 | BuildRequires: rpmbuild(macros) >= 1.219 | |
15 | Requires: python-modules | |
16 | BuildArch: noarch | |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %description | |
20 | Requests is an ISC Licensed HTTP library, written in Python, for human | |
21 | beings. | |
22 | ||
23 | Most existing Python modules for sending HTTP requests are extremely | |
24 | verbose and cumbersome. Python's builtin urllib2 module provides most | |
25 | of the HTTP capabilities you should need, but the api is thoroughly | |
26 | broken. It requires an enormous amount of work (even method overrides) | |
27 | to perform the simplest of tasks. | |
28 | ||
29 | Things shouldn't be this way. Not in Python. | |
30 | ||
31 | %prep | |
32 | %setup -qc | |
33 | mv *-%{module}-*/* . | |
34 | ||
35 | %build | |
36 | # Filename says 0.13.3, __version__ says 0.13.2, so the test fails | |
37 | #ver=$(%{__python} -c "import requests; print requests.__version__") | |
38 | #test "$ver" = %{version} | |
39 | ||
40 | %{__python} setup.py build | |
41 | ||
42 | %install | |
43 | rm -rf $RPM_BUILD_ROOT | |
44 | %{__python} setup.py install \ | |
45 | --skip-build \ | |
46 | --optimize=2 \ | |
47 | --root=$RPM_BUILD_ROOT | |
48 | ||
49 | %py_postclean | |
50 | ||
51 | %clean | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | ||
54 | %files | |
55 | %defattr(644,root,root,755) | |
56 | %doc AUTHORS.rst README.rst LICENSE docs | |
57 | %{py_sitescriptdir}/%{module} | |
58 | %if "%{py_ver}" > "2.4" | |
59 | %{py_sitescriptdir}/%{module}-%{_verinternal}-*.egg-info | |
60 | %endif |