From 5eea097add0ddf8a9461a954751a0e06fed68b34af8bf9f780b4e37fd2305131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 May 2020 13:34:44 +0000 Subject: [PATCH] Accepting request 808749 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808749 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hetzner?expand=0&rev=9 --- python-hetzner.changes | 5 +++++ python-hetzner.spec | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/python-hetzner.changes b/python-hetzner.changes index bf0b9a7..00ff0ed 100644 --- a/python-hetzner.changes +++ b/python-hetzner.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:17 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon May 27 19:31:07 UTC 2019 - Martin Hauke diff --git a/python-hetzner.spec b/python-hetzner.spec index 443ecde..1cf482c 100644 --- a/python-hetzner.spec +++ b/python-hetzner.spec @@ -1,7 +1,7 @@ # # spec file for package python-hetzner # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2018, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -24,11 +24,13 @@ Release: 0 Summary: High level access to the Hetzner robot License: BSD-2-Clause Group: Development/Languages/Python -Url: https://github.com/aszlig/hetzner +URL: https://github.com/aszlig/hetzner Source: https://github.com/aszlig/hetzner/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -43,15 +45,22 @@ A high-level Python API for accessing the Hetzner robot. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/hetznerctl %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec setup.py test +%post +%python_install_alternative hetznerctl + +%postun +%python_uninstall_alternative hetznerctl + %files %{python_files} %doc README.md %license COPYING -%python3_only %{_bindir}/hetznerctl +%python_alternative %{_bindir}/hetznerctl %{python_sitelib}/* %changelog