From 1c4c90584e678992e076d587d19a2559d2a73b0bb4716de41f71a673b48e7a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 27 May 2020 10:13:00 +0000 Subject: [PATCH] Accepting request 809234 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809234 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-distro?expand=0&rev=21 --- python-distro.changes | 5 +++++ python-distro.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-distro.changes b/python-distro.changes index 26f69ec..db170a7 100644 --- a/python-distro.changes +++ b/python-distro.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 26 07:22:40 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Apr 2 04:18:04 UTC 2020 - Steve Kowalik diff --git a/python-distro.spec b/python-distro.spec index 5960ead..9aae15c 100644 --- a/python-distro.spec +++ b/python-distro.spec @@ -30,6 +30,8 @@ Source: https://files.pythonhosted.org/packages/source/d/distro/distro-% Patch0: assert_locale.patch BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test %if %{with test} @@ -53,6 +55,7 @@ It is a renewed alternative implementation for Python's original platform.linux_ %install %python_install +%python_clone -a %{buildroot}%{_bindir}/distro %if %{with test} %check @@ -60,9 +63,15 @@ It is a renewed alternative implementation for Python's original platform.linux_ LANG=en_US.utf8 %python_exec setup.py pytest %endif +%post +%python_install_alternative distro + +%postun +%python_uninstall_alternative distro + %files %{python_files} %doc CHANGELOG.md README.md -%python3_only %{_bindir}/distro +%python_alternative %{_bindir}/distro %{python_sitelib}/* %%license LICENSE