diff --git a/python-certstream.changes b/python-certstream.changes index fddb804..5e6ee03 100644 --- a/python-certstream.changes +++ b/python-certstream.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:36:43 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Wed Jan 1 11:09:59 UTC 2020 - Sebastian Wagner diff --git a/python-certstream.spec b/python-certstream.spec index a2f8ea0..c074163 100644 --- a/python-certstream.spec +++ b/python-certstream.spec @@ -30,6 +30,8 @@ BuildRequires: %{python_module termcolor} BuildRequires: %{python_module websocket-client >= 0.48.0} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives # /SECTION Requires: python3-termcolor Requires: python3-websocket-client >= 0.48.0 @@ -52,15 +54,22 @@ sed -i -e 's:==:>=:g' requirements.txt %install %python_install +%python_clone -a %{buildroot}%{_bindir}/certstream %python_expand %fdupes %{buildroot}%{$python_sitelib} # there are no tests +%post +%python_install_alternative certstream + +%postun +%python_uninstall_alternative certstream + %files %{python_files} %doc README.md %license LICENSE %{python_sitelib}/certstream/ %{python_sitelib}/certstream-%{version}-py*.egg-info -%python3_only %{_bindir}/certstream +%python_alternative %{_bindir}/certstream %changelog