File python-python-daemon.spec of Package python-python-daemon

# spec file for package python-python-daemon
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define oldpython python
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-python-daemon
Version:        2.1.2
Release:        0
Summary:        Library to implement a well-behaved Unix daemon process
License:        Apache-2.0 and GPL-3.0
Group:          Development/Languages/Python
BuildRequires:  %{python_module devel >= 2.7}
BuildRequires:  %{python_module docutils}
BuildRequires:  %{python_module lockfile >= 0.10}
BuildRequires:  %{python_module mock >= 1.0}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module testscenarios >= 0.4}
BuildRequires:  %{python_module testtools}
BuildRequires:  %{python_module unittest2 >= 0.6}
BuildRequires:  python-rpm-macros
Requires:       python-docutils
Requires:       python-lockfile >= 0.10
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Provides:       %{oldpython}-daemon = %{version}
Obsoletes:      %{oldpython}-daemon < %{version}

This library implements the well-behaved daemon specification of PEP 3143, "Standard daemon
process library".

A well-behaved Unix daemon process is tricky to get right, but the required steps are much the
same for every daemon program. A DaemonContext instance holds the behaviour and configured
process environment for the program; use the instance as a context manager to enter a daemon state.

%setup -q -n python-daemon-%{version}



%python_exec -m pytest test

%files %{python_files}
%doc ChangeLog LICENSE.ASF-2 doc

openSUSE Build Service is sponsored by