From 64a8f5ed8a25da802262773c7c109b24507891bdc85cef060ffdd2eb29204175 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:06:05 +0000 Subject: [PATCH] Accepting request 809268 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809268 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gprof2dot?expand=0&rev=10 --- python-gprof2dot.changes | 5 +++++ python-gprof2dot.spec | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/python-gprof2dot.changes b/python-gprof2dot.changes index aeebb19..6eaf774 100644 --- a/python-gprof2dot.changes +++ b/python-gprof2dot.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 26 06:34:29 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Wed May 6 06:34:30 UTC 2020 - Steve Kowalik diff --git a/python-gprof2dot.spec b/python-gprof2dot.spec index fdf5316..df61f09 100644 --- a/python-gprof2dot.spec +++ b/python-gprof2dot.spec @@ -27,8 +27,9 @@ Source: https://files.pythonhosted.org/packages/source/g/gprof2dot/gprof BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch - %python_subpackages %description @@ -37,18 +38,25 @@ profilers into a dot graph. %prep %setup -q -n gprof2dot-%{version} -sed -i -e '/^#!\//, 1d' gprof2dot.py +sed -i -e '/^#!\//, 1d' gprof2dot.py %build %python_build %install %python_install +%python_clone -a %{buildroot}%{_bindir}/gprof2dot %python_expand %fdupes %{buildroot}%{$python_sitelib} +%post +%python_install_alternative gprof2dot + +%postun +%python_uninstall_alternative gprof2dot + %files %{python_files} %license LICENSE.txt -%python3_only %{_bindir}/gprof2dot +%python_alternative %{_bindir}/gprof2dot %{python_sitelib}/* %changelog