From b3f1df4a55d1a33e95735fc937346739f3b86976d15bc21f7b18dd6154e439e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 20 May 2020 11:28:50 +0000 Subject: [PATCH] Accepting request 807607 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807607 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pprintpp?expand=0&rev=6 --- python-pprintpp.changes | 5 +++++ python-pprintpp.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-pprintpp.changes b/python-pprintpp.changes index d109b51..3ae481d 100644 --- a/python-pprintpp.changes +++ b/python-pprintpp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:15 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sat Aug 24 06:34:13 UTC 2019 - Jan Engelhardt diff --git a/python-pprintpp.spec b/python-pprintpp.spec index f3114c7..fe3e936 100644 --- a/python-pprintpp.spec +++ b/python-pprintpp.spec @@ -1,7 +1,7 @@ # # spec file for package python-pprintpp # -# 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 @@ -31,6 +31,8 @@ BuildRequires: %{python_module parameterized} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -48,16 +50,23 @@ export LANG=en_US.utf-8 %install export LANG=en_US.utf-8 %python_install +%python_clone -a %{buildroot}%{_bindir}/pypprint %python_expand %fdupes %{buildroot}%{$python_sitelib} %check export LANG=en_US.utf-8 %python_exec setup.py test --test-suite=test +%post +%python_install_alternative pypprint + +%postun +%python_uninstall_alternative pypprint + %files %{python_files} %doc CHANGELOG.txt README.rst %license LICENSE.txt -%python3_only %{_bindir}/pypprint +%python_alternative %{_bindir}/pypprint %{python_sitelib}/* %changelog