From ee9642d3a09eaea1f94c9c519f636bf2960e1b50c99931cd8900e530c9a907a2 Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Mon, 20 Jul 2020 12:09:11 +0000 Subject: [PATCH] Accepting request 809594 from home:pgajdos:python - %python3_only -> %python_alternative OBS-URL: https://build.opensuse.org/request/show/809594 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:aws/python-aws-sam-translator?expand=0&rev=16 --- python-aws-sam-translator.changes | 5 +++++ python-aws-sam-translator.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-aws-sam-translator.changes b/python-aws-sam-translator.changes index 436340c..2ee9b24 100644 --- a/python-aws-sam-translator.changes +++ b/python-aws-sam-translator.changes @@ -7,6 +7,11 @@ Wed Jul 1 12:55:50 UTC 2020 - Marketa Calabkova * fix : missing UserPool properties * fix: resource policy generation for {path+} +------------------------------------------------------------------- +Wed May 27 13:48:52 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon May 4 07:16:01 UTC 2020 - Tomáš Chvátal diff --git a/python-aws-sam-translator.spec b/python-aws-sam-translator.spec index 974b8a7..8db3dd6 100644 --- a/python-aws-sam-translator.spec +++ b/python-aws-sam-translator.spec @@ -40,6 +40,8 @@ Requires: python-boto3 >= 1.5 Requires: python-docopt >= 0.6.2 Requires: python-jsonschema >= 3.0 Requires: python-six >= 1.11 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %if 0%{?suse_version} < 1500 BuildRequires: python @@ -83,6 +85,7 @@ sed -i -e 's:~=:>=:g' requirements/base.txt mkdir -p %{buildroot}%{_bindir} install -D -m 755 bin/sam-translate.py %{buildroot}%{_bindir}/sam-translate +%python_clone -a %{buildroot}%{_bindir}/sam-translate %if %{with test} %check @@ -90,10 +93,16 @@ export LANG=en_US.UTF8 %pytest %endif +%post +%python_install_alternative sam-translate + +%postun +%python_uninstall_alternative sam-translate + %files %{python_files} %doc README.md %license LICENSE -%python3_only %{_bindir}/sam-translate +%python_alternative %{_bindir}/sam-translate %{python_sitelib}/* %changelog