]> git.pld-linux.org Git - packages/python-grequests.git/blob - python-grequests.spec
- started python3 support
[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_with  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-distribute
26 BuildRequires:  python3-gevent
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.219
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 GRequests allows you to use Requests with Gevent to make asyncronous
35 HTTP Requests easily.
36
37 %package -n python3-%{module}
38 Summary:        gevent support for python-requests
39 Group:          Libraries/Python
40 Requires:       python3-libs
41 Requires:       python3-requests
42
43 %description -n python3-%{module}
44 GRequests allows you to use Requests with Gevent to make asyncronous
45 HTTP Requests easily.
46
47 %prep
48 %setup -q -n %{module}-%{version}
49
50 %build
51 %if %{with python2}
52 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
53 %endif
54
55 %if %{with python3}
56 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 %if %{with python2}
63 %{__python} setup.py \
64                 build --build-base build-2 \
65                 install --skip-build \
66                 --optimize=2 \
67                 --root=$RPM_BUILD_ROOT
68
69 %py_postclean
70 %endif
71
72 %if %{with python3}
73 %{__python3} setup.py \
74                 build --build-base build-3 \
75                 install --skip-build \
76                 --optimize=2 \
77                 --root=$RPM_BUILD_ROOT
78 %endif
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %if %{with python2}
84 %files
85 %defattr(644,root,root,755)
86 %doc README.rst
87 %{py_sitescriptdir}/*.py[co]
88 %if "%{py_ver}" > "2.4"
89 %{py_sitescriptdir}/*.egg-info
90 %endif
91 %endif
92
93 %if %{with python3}
94 %files -n python3-%{module}
95 %defattr(644,root,root,755)
96 %doc README.rst
97 #%{py3_sitescriptdir}/%{module}
98 #%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
99 %endif
This page took 0.095492 seconds and 3 git commands to generate.