3 %bcond_without doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module grequests
9 Summary: gevent support for python-requests
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: https://pypi.python.org/packages/source/g/grequests/grequests-%{version}.tar.gz
16 # Source0-md5: 23186795cf69d127f5e90df665d25387
17 URL: https://github.com/kennethreitz/grequests
19 BuildRequires: python-distribute
20 BuildRequires: python-gevent
22 Requires: python-requests
25 BuildRequires: python3-gevent
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.710
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 GRequests allows you to use Requests with Gevent to make asyncronous
36 %package -n python3-%{module}
37 Summary: gevent support for python-requests
38 Group: Libraries/Python
39 Requires: python3-libs
40 Requires: python3-requests
42 %description -n python3-%{module}
43 GRequests allows you to use Requests with Gevent to make asyncronous
47 %setup -q -n %{module}-%{version}
51 %py_build %{?with_tests:test}
55 %py3_build %{?with_tests:test}
59 rm -rf $RPM_BUILD_ROOT
72 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
78 %{py_sitescriptdir}/*.py[co]
79 %if "%{py_ver}" > "2.4"
80 %{py_sitescriptdir}/*.egg-info
85 %files -n python3-%{module}
86 %defattr(644,root,root,755)
88 %{py3_sitescriptdir}/%{module}.py
89 %{py3_sitescriptdir}/__pycache__/%{module}*.py*
90 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info