]>
Commit | Line | Data |
---|---|---|
a7c6cef5 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # do not perform "make test" | |
4 | # Disabled tests as pidlockfile is not anymore in the lastest python-lockfile | |
5 | ||
6 | %define module daemon | |
7 | Summary: Library to implement a well-behaved Unix daemon process | |
8 | Name: python-%{module} | |
9 | Version: 1.6 | |
2013bd14 | 10 | Release: 4 |
a7c6cef5 ER |
11 | License: Python |
12 | Group: Development/Languages | |
a7c6cef5 | 13 | Source0: http://pypi.python.org/packages/source/p/python-daemon/%{name}-%{version}.tar.gz |
41f92aea | 14 | # Source0-md5: c774eda27d6c5d80b42037826d29e523 |
835b8c11 | 15 | URL: http://pypi.python.org/pypi/python-daemon/ |
a7c6cef5 ER |
16 | BuildRequires: python-devel |
17 | BuildRequires: python-setuptools | |
835b8c11 | 18 | BuildRequires: rpm-pythonprov |
cd2865ab | 19 | BuildRequires: rpmbuild(macros) >= 1.710 |
a7c6cef5 ER |
20 | BuildRequires: sed >= 4.0 |
21 | %if %{with tests} | |
22 | BuildRequires: python-lockfile | |
23 | BuildRequires: python-minimock | |
24 | %endif | |
25 | Requires: python-lockfile | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | This library implements the well-behaved daemon specification of PEP | |
31 | 3143, "Standard daemon process library". | |
32 | ||
33 | %prep | |
34 | %setup -q | |
35 | ||
36 | %{__sed} -i -e '/^#!\//, 1d' daemon/version/version_info.py | |
37 | ||
38 | %build | |
ce275acd | 39 | %py_build |
a7c6cef5 ER |
40 | |
41 | # Test suite requires minimock and lockfile | |
42 | %if %{with tests} | |
835b8c11 | 43 | PYTHONPATH=$(pwd) nosetests-%{py_ver} |
a7c6cef5 ER |
44 | %endif |
45 | ||
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
ce275acd | 48 | %py_install |
a7c6cef5 ER |
49 | |
50 | %py_postclean | |
51 | ||
52 | %{__rm} -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/tests | |
53 | ||
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %files | |
58 | %defattr(644,root,root,755) | |
59 | %doc LICENSE.PSF-2 | |
60 | %dir %{py_sitescriptdir}/daemon | |
61 | %dir %{py_sitescriptdir}/daemon/version | |
62 | %{py_sitescriptdir}/daemon/*.py[co] | |
63 | %{py_sitescriptdir}/daemon/version/*.py[co] | |
64 | %{py_sitescriptdir}/python_daemon-%{version}-py%{py_ver}.egg-info |