diff --git a/python-flit.changes b/python-flit.changes index 99cf9f6..8b27aad 100644 --- a/python-flit.changes +++ b/python-flit.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 26 06:34:17 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sun May 19 05:59:49 AM UTC 2019 - John Vandenberg diff --git a/python-flit.spec b/python-flit.spec index 680d1b6..5ed185e 100644 --- a/python-flit.spec +++ b/python-flit.spec @@ -1,7 +1,7 @@ # # spec file for package python-flit # -# 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 @@ -39,6 +39,8 @@ BuildRequires: python-rpm-macros Requires: python-docutils Requires: python-pytoml Requires: python-requests-download +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %if %{python3_version_nodots} < 36 BuildRequires: %{python_module zipfile36} @@ -61,6 +63,7 @@ sed -i 's/distutils.core/setuptools/' setup.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/flit %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -68,10 +71,16 @@ sed -i 's/distutils.core/setuptools/' setup.py # test_invalid_classifier requires internet %pytest -k 'not (test_build_sdist or test_invalid_classifier)' +%post +%python_install_alternative flit + +%postun +%python_uninstall_alternative flit + %files %{python_files} %doc README.rst %license LICENSE -%python3_only %{_bindir}/flit +%python_alternative %{_bindir}/flit %{python_sitelib}/* %changelog