From 18b52eddc7c3d67acd54596ca925e18792fb6ed030e2e6b5054db1469cd65e70 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 19 Jan 2021 05:01:08 +0000 Subject: [PATCH] - Switch from python3_only to python_alternative for hcltool. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyhcl?expand=0&rev=6 --- python-pyhcl.changes | 5 +++++ python-pyhcl.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-pyhcl.changes b/python-pyhcl.changes index 262d49f..bdf9358 100644 --- a/python-pyhcl.changes +++ b/python-pyhcl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 19 05:00:15 UTC 2021 - Steve Kowalik + +- Switch from python3_only to python_alternative for hcltool. + ------------------------------------------------------------------- Fri Aug 7 14:13:43 UTC 2020 - Marketa Calabkova diff --git a/python-pyhcl.spec b/python-pyhcl.spec index 78ff48d..ef30b5f 100644 --- a/python-pyhcl.spec +++ b/python-pyhcl.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyhcl # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,6 +29,8 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch +Requires(post): update-alternatives +Requires(postun): update-alternatives %python_subpackages %description @@ -43,14 +45,21 @@ HCL configuration parser for python %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_clone -a %{buildroot}%{_bindir}/hcltool %check %pytest +%post +%python_install_alternative hcltool + +%postun +%python_uninstall_alternative hcltool + %files %{python_files} %doc CHANGELOG.md README.rst %license LICENSE -%python3_only %{_bindir}/hcltool +%python_alternative %{_bindir}/hcltool %{python_sitelib}/* %changelog