diff --git a/python-bottle.changes b/python-bottle.changes index 2b9fd6a..b33eef0 100644 --- a/python-bottle.changes +++ b/python-bottle.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 14 11:52:22 UTC 2020 - Matej Cepl + +- Don't use %python3_only command, but properly use alternatives. + ------------------------------------------------------------------- Wed Apr 8 12:04:22 UTC 2020 - Tomáš Chvátal diff --git a/python-bottle.spec b/python-bottle.spec index 650d451..e1fd98d 100644 --- a/python-bottle.spec +++ b/python-bottle.spec @@ -41,6 +41,8 @@ no dependencies other than the Python Standard Library. %package -n %{name}-doc Summary: Documentation for %{name} Provides: %{python_module bottle-doc = %{version}} +Requires(post): update-alternatives +Requires(postun): update-alternatives %description -n %{name}-doc Bottle is a micro-framework for small web applications. It offers @@ -63,13 +65,18 @@ chmod -x bottle.egg-info/* %install %python_install -%python_clone %{buildroot}%{_bindir}/bottle.py +%python_clone -a %{buildroot}%{_bindir}/bottle.py + +%post +%python_install_alternative bottle.py + +%postun +%python_uninstall_alternative bottle.py %files %{python_files} %license LICENSE %doc README.rst -%{_bindir}/bottle.py-%{python_bin_suffix} -%python3_only %{_bindir}/bottle.py +%python_alternative %{_bindir}/bottle.py %{python_sitelib}/bottle.py* %pycache_only %{python_sitelib}/__pycache__ %{python_sitelib}/bottle-%{version}-py%{python_version}.egg-info