]>
Commit | Line | Data |
---|---|---|
5dec254b ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
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: 1 | |
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 | %endif | |
23 | %if %{with python3} | |
24 | BuildRequires: python3-modules | |
25 | BuildRequires: python3-setuptools | |
26 | %endif | |
27 | BuildArch: noarch | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | rq is a simple, lightweight, library for creating background jobs, and | |
32 | processing them. | |
33 | ||
34 | %package -n python3-%{module} | |
35 | Summary: RQ is a simple, lightweight, library for creating background jobs, and processing them | |
36 | Group: Libraries/Python | |
37 | ||
38 | %description -n python3-%{module} | |
39 | rq is a simple, lightweight, library for creating background jobs, and | |
40 | processing them. | |
41 | ||
42 | %prep | |
43 | %setup -q -n %{module}-%{version} | |
44 | ||
45 | # Remove bundled egg-info | |
46 | %{__rm} -r %{module}.egg-info | |
47 | ||
48 | %build | |
49 | %if %{with python2} | |
50 | %py_build %{?with_tests:test} | |
51 | %endif | |
52 | ||
53 | %if %{with python3} | |
54 | %py3_build %{?with_tests:test} | |
55 | %endif | |
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | %if %{with python2} | |
60 | %py_install | |
61 | %py_postclean | |
62 | %endif | |
63 | ||
64 | %if %{with python3} | |
65 | %py3_install | |
66 | %endif | |
67 | ||
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %if %{with python3} | |
72 | %files | |
73 | %defattr(644,root,root,755) | |
74 | %doc README.md LICENSE | |
75 | %{py_sitescriptdir}/%{module} | |
76 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
77 | %endif | |
78 | ||
79 | %if %{with python3} | |
80 | %files -n python3-%{module} | |
81 | %defattr(644,root,root,755) | |
82 | %doc README.md LICENSE | |
83 | %{py3_sitescriptdir}/%{module} | |
84 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
85 | %endif |