LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File python-zdaemon.spec of Package python-zdaemon (Project home:frispete:python)

# spec file for package python-zdaemon
# 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 http://bugs.opensuse.org/

%define modname zdaemon
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-%{modname}
Version:        4.2.0
Release:        0
Summary:        Daemon process control library and tools
License:        ZPL-2.1
Group:          Development/Languages/Python
Url:            https://github.com/zopefoundation/zdaemon
Source:         https://files.pythonhosted.org/packages/source/z/zdaemon/%{modname}-%{version}.tar.gz
BuildRequires:  %{python_module ZConfig}
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-ZConfig
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

zdaemon is a Python package which provides APIs for managing
applications run as daemons. Its principal use to date has been to
manage the application server and storage server daemons for Zope / ZEO,
although it is not limited to running Python-based applications

%setup -q -n %{modname}-%{version}
# remove unwanted shebang
sed -i '1 { /^#!/ d }' src/zdaemon/tests/nokill.py
rm -rf src/zdaemon.egg-info


%python_expand %fdupes -s %{buildroot}%{$python_sitelib}

%python_clone -a %{buildroot}%{_bindir}/zdaemon

%python_install_alternative zdaemon

%python_uninstall_alternative zdaemon

%files %{python_files}
%python_alternative %{_bindir}/zdaemon