diff --git a/python-certipy.changes b/python-certipy.changes index ff409cf..59f99f6 100644 --- a/python-certipy.changes +++ b/python-certipy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 19 05:53:17 UTC 2021 - Steve Kowalik + +- Switch from python3_only to python_alternative for certipy + ------------------------------------------------------------------- Thu Aug 8 10:55:43 AM UTC 2019 - John Vandenberg diff --git a/python-certipy.spec b/python-certipy.spec index 11ec429..c43d361 100644 --- a/python-certipy.spec +++ b/python-certipy.spec @@ -1,7 +1,7 @@ # # spec file for package python-certipy # -# 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 @@ -36,6 +36,8 @@ BuildArch: noarch BuildRequires: %{python_module pyOpenSSL} BuildRequires: %{python_module pytest} # /SECTION +Requires(post): update-alternatives +Requires(postun): update-alternatives %python_subpackages %description @@ -53,16 +55,23 @@ sed -i 's/\.\.certipy/certipy/' test/*.py %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_clone -a %{buildroot}%{_bindir}/certipy %check mkdir tmp export TMP=$(pwd)/tmp %pytest test/ +%post +%python_install_alternative certipy + +%postun +%python_uninstall_alternative certipy + %files %{python_files} %doc README.md %license LICENSE -%python3_only %{_bindir}/certipy +%python_alternative %{_bindir}/certipy %{python_sitelib}/* %changelog