diff --git a/python-bugzillatools.changes b/python-bugzillatools.changes index 250eb2d..3e15299 100644 --- a/python-bugzillatools.changes +++ b/python-bugzillatools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:36:32 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Tue Dec 4 12:46:20 UTC 2018 - Matej Cepl diff --git a/python-bugzillatools.spec b/python-bugzillatools.spec index d78f7a1..c964d08 100644 --- a/python-bugzillatools.spec +++ b/python-bugzillatools.spec @@ -1,7 +1,7 @@ # # spec file for package python-bugzillatools # -# Copyright (c) 2018 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 @@ -34,6 +34,8 @@ Patch1: no-bzrlib-py3k.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives # We want to conflict even package literally called python-bugzilla # without the python version number Conflicts: %{oldpython}-bugzilla @@ -58,14 +60,21 @@ sed -i "/.bugzillarc.sample/d" setup.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/bugzilla %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec -munittest discover -v +%post +%python_install_alternative bugzilla + +%postun +%python_uninstall_alternative bugzilla + %files %{python_files} %doc CHANGES README.rst gpl-3.0.txt -%python3_only %{_bindir}/bugzilla +%python_alternative %{_bindir}/bugzilla %{python_sitelib}/bzlib %{python_sitelib}/bzrlib %{python_sitelib}/bugzillatools-%{version}-py%{python_version}.egg-info