From 5b96da7d0f6a31e8b06307fa0c004a6d3d045c07bbdb45424282f2f7302ec88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 20 May 2020 11:38:23 +0000 Subject: [PATCH] Accepting request 807628 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807628 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyroma?expand=0&rev=8 --- python-pyroma.changes | 5 +++++ python-pyroma.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-pyroma.changes b/python-pyroma.changes index 716e760..ce850d2 100644 --- a/python-pyroma.changes +++ b/python-pyroma.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:41 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Mar 20 14:10:29 UTC 2020 - Marketa Calabkova diff --git a/python-pyroma.spec b/python-pyroma.spec index b3b5c99..18aa11b 100644 --- a/python-pyroma.spec +++ b/python-pyroma.spec @@ -33,6 +33,8 @@ BuildRequires: python-rpm-macros Requires: python-Pygments Requires: python-docutils Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -55,16 +57,23 @@ export LANG=en_US.UTF-8 %install export LANG=en_US.UTF-8 %python_install +%python_clone -a %{buildroot}%{_bindir}/pyroma %python_expand %fdupes %{buildroot}%{$python_sitelib} %check export LANG=en_US.UTF-8 %python_exec setup.py test +%post +%python_install_alternative pyroma + +%postun +%python_uninstall_alternative pyroma + %files %{python_files} %license LICENSE.txt %doc README.rst HISTORY.txt -%python3_only %{_bindir}/pyroma +%python_alternative %{_bindir}/pyroma %{python_sitelib}/* %changelog