From 9274293cd724b7ad40067fb2f7820926816cfdf4e5680bd5304d5f4c0a7e237c 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:46 +0000 Subject: [PATCH] Accepting request 808763 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808763 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-j2gen?expand=0&rev=6 --- python-j2gen.changes | 5 +++++ python-j2gen.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-j2gen.changes b/python-j2gen.changes index efe807c..55d0a40 100644 --- a/python-j2gen.changes +++ b/python-j2gen.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:31 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Sep 30 08:26:37 UTC 2019 - Thomas Bechtold diff --git a/python-j2gen.spec b/python-j2gen.spec index f5b6c85..a073e2d 100644 --- a/python-j2gen.spec +++ b/python-j2gen.spec @@ -1,7 +1,7 @@ # # spec file for package python-j2gen # -# 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 @@ -32,6 +32,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-Jinja2 Requires: python-PyYAML +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Jinja2} @@ -53,15 +55,22 @@ Jinja2 template renderer with yaml input files %install %python_install +%python_clone -a %{buildroot}%{_bindir}/j2gen %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec setup.py test +%post +%python_install_alternative j2gen + +%postun +%python_uninstall_alternative j2gen + %files %{python_files} %doc AUTHORS ChangeLog README.rst %license LICENSE -%python3_only %{_bindir}/j2gen +%python_alternative %{_bindir}/j2gen %{python_sitelib}/* %changelog