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