From 818b76ca1e5c8a8aafe101ae4faed60c9838f4ae792e8d9b29e455e82fb98fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 18 May 2020 13:01:45 +0000 Subject: [PATCH] Accepting request 806916 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/806916 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transip?expand=0&rev=14 --- python-transip.changes | 5 +++++ python-transip.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-transip.changes b/python-transip.changes index a90ab20..3dd46ae 100644 --- a/python-transip.changes +++ b/python-transip.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 09:10:35 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Apr 17 11:00:06 UTC 2020 - pgajdos@suse.com diff --git a/python-transip.spec b/python-transip.spec index e9138d3..2db2d61 100644 --- a/python-transip.spec +++ b/python-transip.spec @@ -37,6 +37,8 @@ Requires: python-cryptography Requires: python-requests Requires: python-setuptools Requires: python-suds-jurko +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -51,15 +53,22 @@ This library implements part of the TransIP API in Python. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/transip-api %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # testConstructor needs network connection %pytest -k 'not (test_constructor or testConstructor)' +%post +%python_install_alternative transip-api + +%postun +%python_uninstall_alternative transip-api + %files %{python_files} %license LICENSE %{python_sitelib}/* -%python3_only %{_bindir}/transip-api +%python_alternative %{_bindir}/transip-api %changelog