From 7d53eb6623d739abae56629169ae413996998b2213f0f9555304dd6afc417afa 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:33:50 +0000 Subject: [PATCH] Accepting request 807634 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807634 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-bidi?expand=0&rev=9 --- python-python-bidi.changes | 5 +++++ python-python-bidi.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-python-bidi.changes b/python-python-bidi.changes index c43c7a6..4a7503c 100644 --- a/python-python-bidi.changes +++ b/python-python-bidi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:49 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Jul 22 13:25:46 UTC 2019 - Tomáš Chvátal diff --git a/python-python-bidi.spec b/python-python-bidi.spec index 2aa8eab..2b659d1 100644 --- a/python-python-bidi.spec +++ b/python-python-bidi.spec @@ -1,7 +1,7 @@ # # spec file for package python-python-bidi # -# 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: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-six +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module six} @@ -47,15 +49,22 @@ sed -i -e '/^#!\//, 1d' bidi/__init__.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pybidi %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec setup.py test +%post +%python_install_alternative pybidi + +%postun +%python_uninstall_alternative pybidi + %files %{python_files} %doc AUTHORS.rst CHANGELOG.rst README.rst %license COPYING COPYING.LESSER -%python3_only %{_bindir}/pybidi +%python_alternative %{_bindir}/pybidi %{python_sitelib}/* %changelog