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_with 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-distribute
26 BuildRequires: python3-gevent
28 BuildRequires: rpm-pythonprov
29 BuildRequires: rpmbuild(macros) >= 1.219
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 GRequests allows you to use Requests with Gevent to make asyncronous
37 %package -n python3-%{module}
38 Summary: gevent support for python-requests
39 Group: Libraries/Python
40 Requires: python3-libs
41 Requires: python3-requests
43 %description -n python3-%{module}
44 GRequests allows you to use Requests with Gevent to make asyncronous
48 %setup -q -n %{module}-%{version}
52 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
56 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
60 rm -rf $RPM_BUILD_ROOT
63 %{__python} setup.py \
64 build --build-base build-2 \
65 install --skip-build \
67 --root=$RPM_BUILD_ROOT
73 %{__python3} setup.py \
74 build --build-base build-3 \
75 install --skip-build \
77 --root=$RPM_BUILD_ROOT
81 rm -rf $RPM_BUILD_ROOT
85 %defattr(644,root,root,755)
87 %{py_sitescriptdir}/*.py[co]
88 %if "%{py_ver}" > "2.4"
89 %{py_sitescriptdir}/*.egg-info
94 %files -n python3-%{module}
95 %defattr(644,root,root,755)
97 #%{py3_sitescriptdir}/%{module}
98 #%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info