diff --git a/python-cloudflare.changes b/python-cloudflare.changes index b1cab72..66ca521 100644 --- a/python-cloudflare.changes +++ b/python-cloudflare.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:36:45 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Mar 20 01:13:51 UTC 2020 - Steve Kowalik diff --git a/python-cloudflare.spec b/python-cloudflare.spec index 3f35e0d..026ce5d 100644 --- a/python-cloudflare.spec +++ b/python-cloudflare.spec @@ -36,6 +36,8 @@ Requires: python-PyYAML Requires: python-future Requires: python-jsonlines Requires: python-requests +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -50,14 +52,21 @@ Python wrapper for the Cloudflare Client API v4. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/cli4 # remove examples from sitelib %python_expand rm -rf %{buildroot}%{$python_sitelib}/examples %python_expand %fdupes %{buildroot}%{$python_sitelib} +%post +%python_install_alternative cli4 + +%postun +%python_uninstall_alternative cli4 + %files %{python_files} %doc README.rst %license LICENSE -%python3_only %{_bindir}/cli4 +%python_alternative %{_bindir}/cli4 %{python_sitelib}/* %changelog