diff --git a/python-importlab.changes b/python-importlab.changes index ea0c109..c88a35d 100644 --- a/python-importlab.changes +++ b/python-importlab.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:26 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Jan 6 15:18:28 UTC 2020 - Todd R diff --git a/python-importlab.spec b/python-importlab.spec index 0134fe2..64cfff1 100644 --- a/python-importlab.spec +++ b/python-importlab.spec @@ -1,7 +1,7 @@ # # spec file for package python-importlab # -# Copyright (c) 2020 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 @@ -31,6 +31,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-networkx Requires: python-six +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module networkx} @@ -49,12 +51,19 @@ A library to calculate python dependency graphs. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/importlab %python_expand %fdupes %{buildroot}%{$python_sitelib} +%post +%python_install_alternative importlab + +%postun +%python_uninstall_alternative importlab + %files %{python_files} %doc CHANGELOG README.rst %license LICENSE -%python3_only %{_bindir}/importlab +%python_alternative %{_bindir}/importlab %{python_sitelib}/* %changelog