From 2be7671ae6a27aa2620bd122669fec3df159358109688928b465893bc4d7e322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 May 2020 09:23:10 +0000 Subject: [PATCH] Accepting request 808638 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808638 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Mako?expand=0&rev=70 --- python-Mako.changes | 5 +++++ python-Mako.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-Mako.changes b/python-Mako.changes index d53663f..d4fcf6e 100644 --- a/python-Mako.changes +++ b/python-Mako.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 06:50:43 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Mar 2 08:38:32 UTC 2020 - Ondřej Súkup diff --git a/python-Mako.spec b/python-Mako.spec index af0985a..c0000ea 100644 --- a/python-Mako.spec +++ b/python-Mako.spec @@ -24,7 +24,7 @@ Release: 0 Summary: A Python templating language License: MIT Group: Development/Languages/Python -URL: http://www.makotemplates.org/ +URL: https://www.makotemplates.org/ Source: https://files.pythonhosted.org/packages/source/M/Mako/Mako-%{version}.tar.gz BuildRequires: %{python_module MarkupSafe >= 0.9.2} BuildRequires: %{python_module mock} @@ -35,6 +35,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-MarkupSafe >= 0.9.2 Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24 Recommends: python-Beaker >= 1.1 @@ -66,16 +68,23 @@ scoping semantics. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/mako-render %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative mako-render + +%postun +%python_uninstall_alternative mako-render + %files %{python_files} %license LICENSE %doc CHANGES README.rst %doc examples -%python3_only %{_bindir}/mako-render +%python_alternative %{_bindir}/mako-render %{python_sitelib}/mako/ %{python_sitelib}/Mako-%{version}-py*.egg-info