14
0

Accepting request 508370 from home:alois:branches:devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/508370
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zdaemon?expand=0&rev=23
This commit is contained in:
2017-07-06 11:33:27 +00:00
committed by Git OBS Bridge
parent f82e5808e5
commit f652afda80
4 changed files with 33 additions and 32 deletions

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sat Jun 24 13:13:12 UTC 2017 - aloisio@gmx.com
- Update to version 4.2.0:
* Add support for Python 3.5.
* Drop support for Python 2.6 and 3.2.
- Converted to single-spec
-------------------------------------------------------------------
Fri May 15 09:19:11 UTC 2015 - benoit.monin@gmx.fr

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-zdaemon
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# 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
@@ -17,27 +17,26 @@
%define modname zdaemon
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-%{modname}
Version: 4.1.0
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://pypi.python.org/packages/source/z/zdaemon/%{modname}-%{version}.zip
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: unzip
Requires(post): update-alternatives
Requires(postun): update-alternatives
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
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%python_subpackages
%description
zdaemon is a Python package which provides APIs for managing
@@ -47,35 +46,29 @@ although it is not limited to running Python-based applications
%prep
%setup -q -n %{modname}-%{version}
sed -i "s|%{modname} =|%{modname}-%{py_ver} =|" setup.py
# remove unwanted shebang
sed -i '1 { /^#!/ d }' src/zdaemon/tests/nokill.py
rm -rf src/zdaemon.egg-info
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# create a dummy target for /etc/alternatives/zdaemon
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/%{modname}
ln -s -f %{_sysconfdir}/alternatives/%{modname} %{buildroot}/%{_bindir}/%{modname}
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/zdaemon
%post
update-alternatives \
--install %{_bindir}/%{modname} %{modname} %{_bindir}/%{modname}-%{py_ver} 20
%python_install_alternative zdaemon
%postun
if [ $1 -eq 0 ] ; then
update-alternatives --remove %{modname} %{_bindir}/%{modname}-%{py_ver}
fi
%python_uninstall_alternative zdaemon
%files
%files %{python_files}
%defattr(-,root,root)
%doc README.rst CHANGES.rst LICENSE.txt
%ghost %{_sysconfdir}/alternatives/%{modname}
%python_alternative %{_bindir}/zdaemon
%{python_sitelib}/*
%{_bindir}/%{modname}
%{_bindir}/%{modname}-%{py_ver}
%changelog

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:185b374ab49f928bbcdb7572c5cd7c3a9e75324a005ce73dfee4208ce10ab1f9
size 74287

3
zdaemon-4.2.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee7b118069e7e6a5ea93df8aabaa0b6549dff4414fda259d0efc036c5c73e1bf
size 56874