diff --git a/python-qet_tb_generator.changes b/python-qet_tb_generator.changes index 5b47bca..11cdcbb 100644 --- a/python-qet_tb_generator.changes +++ b/python-qet_tb_generator.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 19 09:27:36 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sun Mar 8 17:46:46 UTC 2020 - aloisio@gmx.com diff --git a/python-qet_tb_generator.spec b/python-qet_tb_generator.spec index 1e7a39f..e2a2181 100644 --- a/python-qet_tb_generator.spec +++ b/python-qet_tb_generator.spec @@ -32,6 +32,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-qt5 Requires: qelectrotech +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -53,12 +55,19 @@ sed -i 's/qet_tb_generator=src.main:main/qet_tb_generator=qet_tb_generator.main: %install %python_install +%python_clone -a %{buildroot}%{_bindir}/%{modname} %python_expand %fdupes %{buildroot}%{$python_sitelib} +%post +%python_install_alternative %{modname} + +%postun +%python_uninstall_alternative %{modname} + %files %{python_files} %doc README %license LICENSE.txt -%python3_only %{_bindir}/%{modname} +%python_alternative %{_bindir}/%{modname} %{python_sitelib}/qet_tb_generator* %changelog