diff --git a/python-zdaemon.changes b/python-zdaemon.changes index 0662f80..5899ce8 100644 --- a/python-zdaemon.changes +++ b/python-zdaemon.changes @@ -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 diff --git a/python-zdaemon.spec b/python-zdaemon.spec index 8043f7a..3326a56 100644 --- a/python-zdaemon.spec +++ b/python-zdaemon.spec @@ -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 diff --git a/zdaemon-4.1.0.zip b/zdaemon-4.1.0.zip deleted file mode 100644 index 02ce36f..0000000 --- a/zdaemon-4.1.0.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:185b374ab49f928bbcdb7572c5cd7c3a9e75324a005ce73dfee4208ce10ab1f9 -size 74287 diff --git a/zdaemon-4.2.0.tar.gz b/zdaemon-4.2.0.tar.gz new file mode 100644 index 0000000..a4c0318 --- /dev/null +++ b/zdaemon-4.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee7b118069e7e6a5ea93df8aabaa0b6549dff4414fda259d0efc036c5c73e1bf +size 56874