]> git.pld-linux.org Git - packages/python-rq.git/blob - python-rq.spec
- python 3.6
[packages/python-rq.git] / python-rq.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # do not perform "make test" (package doesn't have tests)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  rq
8 Summary:        RQ is a simple, lightweight, library for creating background jobs, and processing them
9 Name:           python-%{module}
10 Version:        0.5.6
11 Release:        2
12 License:        BSD
13 Group:          Libraries/Python
14 Source0:        https://pypi.python.org/packages/c4/7f/a26b981b99ecc56b28f3de27e9f7dc2d5f16dd2f833e80c01b24bdeb9a5c/%{module}-%{version}.tar.gz
15 # Source0-md5:  8c72aae6e95379a07fd000752b1acfbf
16 URL:            https://github.com/nvie/rq/
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.714
19 %if %{with python2}
20 BuildRequires:  python-modules
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-click >= 3.0
24 BuildRequires:  python-redis >= 2.7.0
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-click >= 3.0
32 BuildRequires:  python3-redis >= 2.7.0
33 %endif
34 %endif
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 rq is a simple, lightweight, library for creating background jobs, and
40 processing them.
41
42 %package -n python3-%{module}
43 Summary:        RQ is a simple, lightweight, library for creating background jobs, and processing them
44 Group:          Libraries/Python
45
46 %description -n python3-%{module}
47 rq is a simple, lightweight, library for creating background jobs, and
48 processing them.
49
50 %prep
51 %setup -q -n %{module}-%{version}
52
53 # Remove bundled egg-info
54 %{__rm} -r %{module}.egg-info
55
56 %build
57 %if %{with python2}
58 %py_build %{?with_tests:test}
59 %endif
60
61 %if %{with python3}
62 %py3_build %{?with_tests:test}
63 %endif
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67 %if %{with python2}
68 %py_install
69 %py_postclean
70
71 for a in rq rqinfo rqworker; do
72         mv $RPM_BUILD_ROOT%{_bindir}/$a $RPM_BUILD_ROOT%{_bindir}/$a-2
73 done
74 %endif
75
76 %if %{with python3}
77 %py3_install
78 for a in rq rqinfo rqworker; do
79         mv $RPM_BUILD_ROOT%{_bindir}/$a $RPM_BUILD_ROOT%{_bindir}/$a-3
80 done
81 %endif
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python3}
87 %files
88 %defattr(644,root,root,755)
89 %doc README.md LICENSE
90 %attr(755,root,root) %{_bindir}/rq-2
91 %attr(755,root,root) %{_bindir}/rqinfo-2
92 %attr(755,root,root) %{_bindir}/rqworker-2
93 %{py_sitescriptdir}/%{module}
94 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
95 %endif
96
97 %if %{with python3}
98 %files -n python3-%{module}
99 %defattr(644,root,root,755)
100 %doc README.md LICENSE
101 %attr(755,root,root) %{_bindir}/rq-3
102 %attr(755,root,root) %{_bindir}/rqinfo-3
103 %attr(755,root,root) %{_bindir}/rqworker-3
104 %{py3_sitescriptdir}/%{module}
105 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
106 %endif
This page took 0.110926 seconds and 4 git commands to generate.