From 9a7f17e4a78d83e6f35c1221fc2d834c5cd7512a7b94d6f5f38dfaa19cc3f1f1 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:56 +0000 Subject: [PATCH] Accepting request 808760 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808760 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-importlab?expand=0&rev=11 --- python-importlab.changes | 5 +++++ python-importlab.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-importlab.changes b/python-importlab.changes index ea0c109..c88a35d 100644 --- a/python-importlab.changes +++ b/python-importlab.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:26 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Jan 6 15:18:28 UTC 2020 - Todd R diff --git a/python-importlab.spec b/python-importlab.spec index 0134fe2..64cfff1 100644 --- a/python-importlab.spec +++ b/python-importlab.spec @@ -1,7 +1,7 @@ # # spec file for package python-importlab # -# Copyright (c) 2020 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: fdupes BuildRequires: python-rpm-macros Requires: python-networkx Requires: python-six +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module networkx} @@ -49,12 +51,19 @@ A library to calculate python dependency graphs. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/importlab %python_expand %fdupes %{buildroot}%{$python_sitelib} +%post +%python_install_alternative importlab + +%postun +%python_uninstall_alternative importlab + %files %{python_files} %doc CHANGELOG README.rst %license LICENSE -%python3_only %{_bindir}/importlab +%python_alternative %{_bindir}/importlab %{python_sitelib}/* %changelog