From 35a26744b160e4658749f97f26f4b70870f1492c321f8988315b4dbdd57c3cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 28 May 2020 07:34:59 +0000 Subject: [PATCH] Accepting request 809581 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809581 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cloudflare?expand=0&rev=9 --- python-cloudflare.changes | 5 +++++ python-cloudflare.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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