From c972259eb60961a5035b5fa0c31e796077166da3c6721911f9ee7528445eafc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 19 May 2020 08:52:33 +0000 Subject: [PATCH] Accepting request 807135 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807135 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-srcinfo?expand=0&rev=3 --- python-srcinfo.changes | 5 +++++ python-srcinfo.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-srcinfo.changes b/python-srcinfo.changes index 2dd5da9..4323dd2 100644 --- a/python-srcinfo.changes +++ b/python-srcinfo.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 19 08:03:02 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sat Oct 12 03:28:25 PM UTC 2019 - John Vandenberg diff --git a/python-srcinfo.spec b/python-srcinfo.spec index 8fa4a09..7defcd0 100644 --- a/python-srcinfo.spec +++ b/python-srcinfo.spec @@ -1,7 +1,7 @@ # # spec file for package python-srcinfo # -# 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 setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-parse +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module nose} @@ -50,15 +52,22 @@ Python library to parse Arch .SRCINFO files. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/parse_srcinfo %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec setup.py test +%post +%python_install_alternative parse_srcinfo + +%postun +%python_uninstall_alternative parse_srcinfo + %files %{python_files} %doc README.rst %license LICENSE -%python3_only %{_bindir}/parse_srcinfo +%python_alternative %{_bindir}/parse_srcinfo %{python_sitelib}/* %changelog