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