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