From 495b6b693e87645cc48a634fd235f1527e0c17b3d367e936fda9133c77ba4043 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:08:48 +0000 Subject: [PATCH] Accepting request 809255 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809255 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flex?expand=0&rev=4 --- python-flex.changes | 5 +++++ python-flex.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-flex.changes b/python-flex.changes index fef51f1..1c24285 100644 --- a/python-flex.changes +++ b/python-flex.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 26 06:34:16 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Mar 14 12:12:22 UTC 2019 - Tomáš Chvátal diff --git a/python-flex.spec b/python-flex.spec index 7c93c2c..c8e2a29 100644 --- a/python-flex.spec +++ b/python-flex.spec @@ -1,7 +1,7 @@ # # spec file for package python-flex # -# 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 @@ -49,6 +49,8 @@ Requires: python-rfc3987 >= 1.3.4 Requires: python-six >= 1.7.3 Requires: python-strict-rfc3339 >= 0.7 Requires: python-validate_email >= 1.2 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -63,15 +65,22 @@ Validation tooling for Swagger 2.0 specifications. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/swagger-flex %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative swagger-flex + +%postun +%python_uninstall_alternative swagger-flex + %files %{python_files} %license LICENSE %doc CHANGELOG README.md %{python_sitelib}/* -%python3_only %{_bindir}/swagger-flex +%python_alternative %{_bindir}/swagger-flex %changelog