From 02c3d9872d9f18b5e19b072adeff3b560eb9141714afc1c0fe1d9e036c6762d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 18 May 2020 08:12:02 +0000 Subject: [PATCH] Accepting request 806791 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/806791 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wakeonlan?expand=0&rev=4 --- python-wakeonlan.changes | 5 +++++ python-wakeonlan.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-wakeonlan.changes b/python-wakeonlan.changes index 21d9a78..751485d 100644 --- a/python-wakeonlan.changes +++ b/python-wakeonlan.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 07:25:33 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Mar 21 11:20:55 UTC 2019 - Tomáš Chvátal diff --git a/python-wakeonlan.spec b/python-wakeonlan.spec index ee5b929..707d4fa 100644 --- a/python-wakeonlan.spec +++ b/python-wakeonlan.spec @@ -1,7 +1,7 @@ # # spec file for package python-wakeonlan # -# 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_scm >= 1.15.7} 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.UTF8 %install export LANG=en_US.UTF8 %python_install +%python_clone -a %{buildroot}%{_bindir}/wakeonlan %python_expand %fdupes %{buildroot}/%{$python_sitelib} %check export LANG=en_US.UTF8 %pytest +%post +%python_install_alternative wakeonlan + +%postun +%python_uninstall_alternative wakeonlan + %files %{python_files} %doc README.rst %license LICENSE -%python3_only %{_bindir}/wakeonlan +%python_alternative %{_bindir}/wakeonlan %{python_sitelib}/* %changelog