From 6c7bf4eb79802840322b1646a73f1f99980f4859218ea2754e075c34d78e6a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 28 May 2020 07:32:14 +0000 Subject: [PATCH] Accepting request 809565 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809565 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bashate?expand=0&rev=9 --- python-bashate.changes | 5 +++++ python-bashate.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-bashate.changes b/python-bashate.changes index e56dd48..17985ed 100644 --- a/python-bashate.changes +++ b/python-bashate.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:36:25 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Feb 28 22:50:39 UTC 2020 - Dirk Mueller diff --git a/python-bashate.spec b/python-bashate.spec index 947a422..eec2a82 100644 --- a/python-bashate.spec +++ b/python-bashate.spec @@ -36,6 +36,8 @@ BuildRequires: fdupes BuildRequires: python-argparse Requires: python-Babel >= 0.9.6 Requires: python-pbr +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %ifpython2 Requires: python-argparse @@ -62,6 +64,7 @@ and will continue to evolve over time. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/bashate %{python_expand # rm -rf %{buildroot}%{$python_sitelib}/bashate/tests sed -i -e '/^#!\//, 1d' %{buildroot}%{$python_sitelib}/bashate/bashate.py @@ -71,10 +74,16 @@ sed -i -e '/^#!\//, 1d' %{buildroot}%{$python_sitelib}/bashate/bashate.py %check %python_exec -m stestr.cli run +%post +%python_install_alternative bashate + +%postun +%python_uninstall_alternative bashate + %files %{python_files} %license LICENSE %doc AUTHORS README.rst ChangeLog -%python3_only %{_bindir}/bashate +%python_alternative %{_bindir}/bashate %{python_sitelib}/* %changelog