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