diff --git a/python-keyring.changes b/python-keyring.changes index 1db4eba..7b34182 100644 --- a/python-keyring.changes +++ b/python-keyring.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 06:50:30 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Apr 16 08:27:33 UTC 2020 - pgajdos@suse.com diff --git a/python-keyring.spec b/python-keyring.spec index 037b79b..3060e68 100644 --- a/python-keyring.spec +++ b/python-keyring.spec @@ -39,6 +39,8 @@ Requires: python-SecretStorage >= 3 Requires: python-entrypoints Requires: python-jeepney >= 0.4.2 Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -57,15 +59,22 @@ sed -i -e 's,--flake8,,' -e 's,--black,,' -e 's,--cov,,' pytest.ini %install %python_install +%python_clone -a %{buildroot}%{_bindir}/keyring %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative keyring + +%postun +%python_uninstall_alternative keyring + %files %{python_files} %doc README.rst CHANGES.rst %license LICENSE -%python3_only %{_bindir}/keyring +%python_alternative %{_bindir}/keyring %{python_sitelib}/keyring-%{version}-py*.egg-info %{python_sitelib}/keyring/