From a542da9f585df98850d5b4945b432b28a83e21d7ad56098bdf532d5434a2c610 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 14 Apr 2020 11:58:50 +0000 Subject: [PATCH] - Don't use %python3_only command, but properly use alternatives. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bottle?expand=0&rev=32 --- python-bottle.changes | 5 +++++ python-bottle.spec | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) 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