From 941e1918cc10252a1110a9582f146b0a533006f9c6827c7f6705b4a27e4ef81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 May 2020 13:31:32 +0000 Subject: [PATCH] Accepting request 808768 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808768 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsondiff?expand=0&rev=13 --- python-jsondiff.changes | 5 +++++ python-jsondiff.spec | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/python-jsondiff.changes b/python-jsondiff.changes index c41b73e..a785f20 100644 --- a/python-jsondiff.changes +++ b/python-jsondiff.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:35 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Oct 4 15:22:38 UTC 2019 - Marketa Calabkova diff --git a/python-jsondiff.spec b/python-jsondiff.spec index 2215211..0b8f024 100644 --- a/python-jsondiff.spec +++ b/python-jsondiff.spec @@ -1,7 +1,7 @@ # # spec file for package python-jsondiff # -# 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 @@ -30,6 +30,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 @@ -44,16 +46,26 @@ Package to show differences between JSON and JSON-like structures in Python %install %python_install +%python_clone -a %{buildroot}%{_bindir}/jsondiff +%python_clone -a %{buildroot}%{_bindir}/jdiff %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_expand nosetests-%{$python_bin_suffix} +%post +%python_install_alternative jsondiff +%python_install_alternative jdiff + +%postun +%python_uninstall_alternative jsondiff +%python_uninstall_alternative jdiff + %files %{python_files} %license LICENSE %doc README.rst %{python_sitelib}/* -%python3_only %{_bindir}/jdiff -%python3_only %{_bindir}/jsondiff +%python_alternative %{_bindir}/jdiff +%python_alternative %{_bindir}/jsondiff %changelog