From d7e93d7751bee84284e32653e25aca660c8398538811f11948f2cc6be9a116f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 27 May 2020 14:46:38 +0000 Subject: [PATCH] Accepting request 809586 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809586 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cppclean?expand=0&rev=8 --- python-cppclean.changes | 5 +++++ python-cppclean.spec | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/python-cppclean.changes b/python-cppclean.changes index 9d59df8..c711949 100644 --- a/python-cppclean.changes +++ b/python-cppclean.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:36:50 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Sep 13 10:36:10 UTC 2019 - Tomáš Chvátal diff --git a/python-cppclean.spec b/python-cppclean.spec index 354f81f..5ae3427 100644 --- a/python-cppclean.spec +++ b/python-cppclean.spec @@ -1,7 +1,7 @@ # # spec file for package python-cppclean # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,8 +29,9 @@ BuildRequires: %{python_module setuptools} BuildRequires: bash BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch - %python_subpackages %description @@ -48,15 +49,22 @@ considerable extra compiles increasing the edit-compile-run cycle. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/cppclean %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_expand PYTHON=%{__$python} bash test.bash +%post +%python_install_alternative cppclean + +%postun +%python_uninstall_alternative cppclean + %files %{python_files} %license COPYING %doc README.rst -%python3_only %{_bindir}/cppclean +%python_alternative %{_bindir}/cppclean %{python_sitelib}/* %changelog