From 09f3ca0d0b22e05d035e82bb509d202fc4560ce712602997784f11bcde112768 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:35 +0000 Subject: [PATCH] Accepting request 807604 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807604 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-petact?expand=0&rev=5 --- python-petact.changes | 5 +++++ python-petact.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-petact.changes b/python-petact.changes index e2a1c74..bf69974 100644 --- a/python-petact.changes +++ b/python-petact.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:12 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Jun 3 10:59:26 UTC 2019 - pgajdos@suse.com diff --git a/python-petact.spec b/python-petact.spec index 62f7409..02c79b5 100644 --- a/python-petact.spec +++ b/python-petact.spec @@ -1,7 +1,7 @@ # # spec file for package python-petact # -# 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 @@ -30,6 +30,8 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -49,15 +51,22 @@ cp %{SOURCE99} . %install %python_install +%python_clone -a %{buildroot}%{_bindir}/petact %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # no upstream tests +%post +%python_install_alternative petact + +%postun +%python_uninstall_alternative petact + %files %{python_files} %doc README.md %license LICENSE -%python3_only %{_bindir}/petact +%python_alternative %{_bindir}/petact %{python_sitelib}/* %changelog