]> git.pld-linux.org Git - packages/python-grequests.git/blob - python-grequests.spec
f60f63e0682549256d2418072db0bb91fcdad754
[packages/python-grequests.git] / python-grequests.spec
1 #
2 # Conditional build:
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
7
8 %define         module  grequests
9 Summary:        gevent support for python-requests
10 Name:           python-%{module}
11 Version:        0.2.0
12 Release:        1
13 License:        BSD
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
18 %if %{with python2}
19 BuildRequires:  python-distribute
20 BuildRequires:  python-gevent
21 Requires:       python-libs
22 Requires:       python-requests
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-gevent
26 %endif
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.710
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 GRequests allows you to use Requests with Gevent to make asyncronous
34 HTTP Requests easily.
35
36 %package -n python3-%{module}
37 Summary:        gevent support for python-requests
38 Group:          Libraries/Python
39 Requires:       python3-libs
40 Requires:       python3-requests
41
42 %description -n python3-%{module}
43 GRequests allows you to use Requests with Gevent to make asyncronous
44 HTTP Requests easily.
45
46 %prep
47 %setup -q -n %{module}-%{version}
48
49 %build
50 %if %{with python2}
51 %py_build %{?with_tests:test}
52 %endif
53
54 %if %{with python3}
55 %py3_build %{?with_tests:test}
56 %endif
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60
61 %if %{with python2}
62 %py_install
63
64 %py_postclean
65 %endif
66
67 %if %{with python3}
68 %py3_install
69 %endif
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %if %{with python2}
75 %files
76 %defattr(644,root,root,755)
77 %doc README.rst
78 %{py_sitescriptdir}/*.py[co]
79 %if "%{py_ver}" > "2.4"
80 %{py_sitescriptdir}/*.egg-info
81 %endif
82 %endif
83
84 %if %{with python3}
85 %files -n python3-%{module}
86 %defattr(644,root,root,755)
87 %doc README.rst
88 %{py3_sitescriptdir}/%{module}.py
89 %{py3_sitescriptdir}/__pycache__/%{module}*.py*
90 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
91 %endif
This page took 0.044413 seconds and 2 git commands to generate.