From 4a376dd78e2597b93f0950bb7264a5cd42f6dabc5b12f4be741f001ef63ed686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 27 May 2020 10:10:03 +0000 Subject: [PATCH] Accepting request 809250 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809250 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exrex?expand=0&rev=10 --- python-exrex.changes | 5 +++++ python-exrex.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-exrex.changes b/python-exrex.changes index 012bde3..52c4edc 100644 --- a/python-exrex.changes +++ b/python-exrex.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 26 06:34:10 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Jun 3 10:59:25 UTC 2019 - pgajdos@suse.com diff --git a/python-exrex.spec b/python-exrex.spec index 3b833ea..42414ed 100644 --- a/python-exrex.spec +++ b/python-exrex.spec @@ -1,7 +1,7 @@ # # spec file for package python-exrex # -# 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-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -47,15 +49,22 @@ sed -i '1s/^#!.*//' exrex.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/exrex rm %{buildroot}%{_bindir}/exrex.py %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # no upstream tests +%post +%python_install_alternative exrex + +%postun +%python_uninstall_alternative exrex + %files %{python_files} %{python_sitelib}/* %license COPYING -%python3_only %{_bindir}/exrex +%python_alternative %{_bindir}/exrex %changelog