From 190209433f6ad31ab2d7ebd3405988e662e160c30b2abeff093467b9dd449684 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:27:58 +0000 Subject: [PATCH] Accepting request 807595 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807595 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Parsley?expand=0&rev=12 --- python-Parsley.changes | 5 +++++ python-Parsley.spec | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/python-Parsley.changes b/python-Parsley.changes index 6c96d36..086de54 100644 --- a/python-Parsley.changes +++ b/python-Parsley.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:05 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Nov 7 15:02:03 UTC 2019 - Matej Cepl diff --git a/python-Parsley.spec b/python-Parsley.spec index efdf6e2..768d78f 100644 --- a/python-Parsley.spec +++ b/python-Parsley.spec @@ -1,7 +1,7 @@ # # spec file for package python-Parsley # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2013 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -31,6 +31,8 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives Provides: python-parsley Obsoletes: %{oldpython}-Parsley-doc Obsoletes: python-Parsley-doc @@ -67,6 +69,7 @@ for f in {generate_parser,stage}; do -e "s|^#!%{_bindir}/env python$|#!%{_bindir}/python3|" \ bin/$f cp -v bin/$f %{buildroot}/%{_bindir}/parsley-$f + %python_clone -a %{buildroot}%{_bindir}/parsley-$f done %python_expand %fdupes %{buildroot}%{$python_sitelib} @@ -76,10 +79,19 @@ export LANG=en_US.UTF-8 %pytest ometa/test %pytest terml/test +%post +%python_install_alternative parsley-stage +%python_install_alternative parsley-generate_parser + +%postun +%python_uninstall_alternative parsley-stage +%python_uninstall_alternative parsley-generate_parser + %files %{python_files} %license LICENSE %doc NEWS PKG-INFO README -%python3_only %{_bindir}/parsley* +%python_alternative %{_bindir}/parsley-stage +%python_alternative %{_bindir}/parsley-generate_parser %{python_sitelib}/* %changelog