]> git.pld-linux.org Git - packages/python-redis.git/blame - python-redis.spec
rebuild with tests and docs
[packages/python-redis.git] / python-redis.spec
CommitLineData
832166ef
JK
1#
2# Conditional build:
3%bcond_with tests # perform tests (seem to require redis running)
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
d941188b
ER
7%define module redis
8Summary: A Python client for redis
9Name: python-%{module}
832166ef 10Version: 2.10.5
3823a197 11Release: 9
d941188b
ER
12License: MIT
13Group: Development/Languages
14URL: http://github.com/andymccurdy/redis-py
832166ef
JK
15Source0: https://pypi.python.org/packages/source/r/redis/redis-2.10.5.tar.gz
16# Source0-md5: 3b26c2b9703b4b56b30a1ad508e31083
d941188b 17BuildRequires: rpm-pythonprov
a5217f09 18BuildRequires: rpmbuild(macros) >= 1.710
832166ef
JK
19%if %{with python2}
20BuildRequires: python-setuptools
21%{?with_tests:BuildRequires: python-pytest}
22%endif
23%if %{with python3}
24BuildRequires: python3-setuptools
25%{?with_tests:BuildRequires: python3-pytest}
26%endif
d941188b
ER
27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31This is a Python interface to the Redis key-value store.
32
832166ef
JK
33%package -n python3-%{module}
34Summary: A Python client for redis
35Group: Libraries/Python
36Requires: python3-modules
37
38%description -n python3-%{module}
39This is a Python interface to the Redis key-value store.
40
d941188b
ER
41%prep
42%setup -q -n %{module}-%{version}
43
44%build
832166ef 45%if %{with python2}
6b9135b0 46%py_build %{?with_tests:test}
832166ef
JK
47%endif
48
49%if %{with python3}
6b9135b0 50%py3_build %{?with_tests:test}
832166ef 51%endif
d941188b
ER
52
53%install
54rm -rf $RPM_BUILD_ROOT
832166ef
JK
55
56%if %{with python2}
6b9135b0 57%py_install
d941188b
ER
58
59%py_postclean
832166ef
JK
60%endif
61
62%if %{with python3}
6b9135b0 63%py3_install
832166ef 64%endif
d941188b
ER
65
66%clean
67rm -rf $RPM_BUILD_ROOT
68
69%files
70%defattr(644,root,root,755)
832166ef 71%doc CHANGES README.rst
d941188b
ER
72%{py_sitescriptdir}/%{module}
73%{py_sitescriptdir}/%{module}-%{version}-*.egg-info
832166ef
JK
74
75%files -n python3-%{module}
76%defattr(644,root,root,755)
77%doc CHANGES README.rst
78%{py3_sitescriptdir}/%{module}
79%{py3_sitescriptdir}/%{module}-%{version}-*.egg-info
This page took 0.100437 seconds and 4 git commands to generate.