From 33805cab483ac9e60fc128168139fbf743b8a13ed6c8e83f7d9bbb7e82dbaf77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 18 May 2020 13:01:02 +0000 Subject: [PATCH] Accepting request 806923 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/806923 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-userpath?expand=0&rev=5 --- python-userpath.changes | 5 +++++ python-userpath.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-userpath.changes b/python-userpath.changes index 749ff5b..5155e2e 100644 --- a/python-userpath.changes +++ b/python-userpath.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 09:10:45 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Wed Oct 23 07:06:02 UTC 2019 - Tomáš Chvátal diff --git a/python-userpath.spec b/python-userpath.spec index 657dde5..e2eb372 100644 --- a/python-userpath.spec +++ b/python-userpath.spec @@ -1,7 +1,7 @@ # # spec file for package python-userpath # -# 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,6 +29,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-click Requires: python-distro +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module click} @@ -49,16 +51,23 @@ with no elevated privileges required. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/userpath %python_expand %fdupes %{buildroot}%{$python_sitelib} %check export LC_ALL=C.UTF-8 %pytest +%post +%python_install_alternative userpath + +%postun +%python_uninstall_alternative userpath + %files %{python_files} %doc README.rst %license LICENSE-APACHE LICENSE-MIT -%python3_only %{_bindir}/userpath +%python_alternative %{_bindir}/userpath %{python_sitelib}/* %changelog