From 3c0d7a41f4271c8ad6575d035e2142ffacb0eb721840403fe4b3f014289c8ed3 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:39:02 +0000 Subject: [PATCH] Accepting request 807623 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807623 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyOCD?expand=0&rev=10 --- python-pyOCD.changes | 5 +++++ python-pyOCD.spec | 36 +++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/python-pyOCD.changes b/python-pyOCD.changes index 319388a..87f2994 100644 --- a/python-pyOCD.changes +++ b/python-pyOCD.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:37 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Tue Sep 10 12:47:32 UTC 2019 - Tomáš Chvátal diff --git a/python-pyOCD.spec b/python-pyOCD.spec index 162eb8a..4b7774b 100644 --- a/python-pyOCD.spec +++ b/python-pyOCD.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyOCD # -# 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-usb +Requires(post): update-alternatives +Requires(postun): update-alternatives Provides: python-pyocd = %{version} Obsoletes: python-pyocd < %{version} BuildArch: noarch @@ -47,21 +49,29 @@ On-chip debugger and flasher tool for ARM microcontrollers. %install %python_install -%python_clone %{buildroot}%{_bindir}/pyocd -%python_clone %{buildroot}%{_bindir}/pyocd-flashtool -%python_clone %{buildroot}%{_bindir}/pyocd-gdbserver -%python_clone %{buildroot}%{_bindir}/pyocd-tool +%python_clone -a %{buildroot}%{_bindir}/pyocd +%python_clone -a %{buildroot}%{_bindir}/pyocd-flashtool +%python_clone -a %{buildroot}%{_bindir}/pyocd-gdbserver +%python_clone -a %{buildroot}%{_bindir}/pyocd-tool %python_expand %fdupes %{buildroot}%{$python_sitelib} +%post +%python_install_alternative pyocd +%python_install_alternative pyocd-flashtool +%python_install_alternative pyocd-gdbserver +%python_install_alternative pyocd-tool + +%postun +%python_uninstall_alternative pyocd +%python_uninstall_alternative pyocd-flashtool +%python_uninstall_alternative pyocd-gdbserver +%python_uninstall_alternative pyocd-tool + %files %{python_files} -%{_bindir}/pyocd-flashtool-%{python_bin_suffix} -%{_bindir}/pyocd-gdbserver-%{python_bin_suffix} -%{_bindir}/pyocd-tool-%{python_bin_suffix} -%{_bindir}/pyocd-%{python_bin_suffix} -%python3_only %{_bindir}/pyocd -%python3_only %{_bindir}/pyocd-flashtool -%python3_only %{_bindir}/pyocd-gdbserver -%python3_only %{_bindir}/pyocd-tool +%python_alternative %{_bindir}/pyocd +%python_alternative %{_bindir}/pyocd-flashtool +%python_alternative %{_bindir}/pyocd-gdbserver +%python_alternative %{_bindir}/pyocd-tool %{python_sitelib}/* %changelog