diff --git a/python-tempora.changes b/python-tempora.changes index 3c54e6f..02cb46c 100644 --- a/python-tempora.changes +++ b/python-tempora.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 14 09:12:12 UTC 2020 - Matej Cepl + +- Don't use %python3_only command, but properly use alternatives. + ------------------------------------------------------------------- Thu Mar 26 11:21:36 UTC 2020 - pgajdos@suse.com diff --git a/python-tempora.spec b/python-tempora.spec index 85fe850..0c6a3d5 100644 --- a/python-tempora.spec +++ b/python-tempora.spec @@ -40,6 +40,8 @@ Requires: python-pytz Requires: python-setuptools Requires: python-six BuildArch: noarch +Requires(post): update-alternatives +Requires(postun): update-alternatives %python_subpackages %description @@ -58,16 +60,23 @@ Modules include: %install %python_install +%python_clone -a %{buildroot}%{_bindir}/calc-prorate %python_expand %fdupes %{buildroot}%{$python_sitelib} %check sed -i -e 's:--black::' -e 's:--cov::' -e 's/--flake8//g' pytest.ini %pytest +%post +%python_install_alternative calc-prorate + +%postun +%python_uninstall_alternative calc-prorate + %files %{python_files} %license LICENSE %doc CHANGES.rst README.rst docs/*rst -%python3_only %{_bindir}/calc-prorate +%python_alternative %{_bindir}/calc-prorate %{python_sitelib}/* %changelog