diff --git a/python-pdd.changes b/python-pdd.changes index e83651c..7593258 100644 --- a/python-pdd.changes +++ b/python-pdd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:09 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Wed Apr 24 09:21:19 UTC 2019 - pgajdos@suse.com diff --git a/python-pdd.spec b/python-pdd.spec index c1e8517..7d1d1fe 100644 --- a/python-pdd.spec +++ b/python-pdd.spec @@ -1,7 +1,7 @@ # # spec file for package python-pdd # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,6 @@ # pdd is not available for Python 2 %define skip_python2 1 - %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pdd Version: 1.4 @@ -26,20 +25,21 @@ Release: 0 Summary: Tiny date, time diff calculator with timers License: GPL-3.0-only Group: Development/Languages/Python -Url: https://github.com/jarun/pdd +URL: https://github.com/jarun/pdd Source: https://files.pythonhosted.org/packages/source/p/pdd/pdd-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-python-dateutil +Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil} # /SECTION -BuildRequires: fdupes -Requires: python-python-dateutil -Requires: python-setuptools -BuildArch: noarch - %python_subpackages %description @@ -56,16 +56,23 @@ mv pdd.py pdd %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pdd %python_expand %fdupes %{buildroot}%{$python_sitelib} %check chmod 755 pdd %pytest test.py +%post +%python_install_alternative pdd + +%postun +%python_uninstall_alternative pdd + %files %{python_files} %doc README.md CHANGELOG %license LICENSE -%python3_only %{_bindir}/pdd +%python_alternative %{_bindir}/pdd %{python_sitelib}/* %changelog