From 334909ac8fbe512e38bf55b92dcc3370ad82cf3e93121e678977b9ec5265eaa6 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:53 +0000 Subject: [PATCH] Accepting request 807624 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807624 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyperf?expand=0&rev=7 --- python-pyperf.changes | 5 +++++ python-pyperf.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-pyperf.changes b/python-pyperf.changes index 605edbc..cd86e1b 100644 --- a/python-pyperf.changes +++ b/python-pyperf.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:37 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Mar 20 12:42:05 UTC 2020 - Marketa Calabkova diff --git a/python-pyperf.spec b/python-pyperf.spec index ca85b54..31b0955 100644 --- a/python-pyperf.spec +++ b/python-pyperf.spec @@ -28,6 +28,8 @@ Source: https://files.pythonhosted.org/packages/source/p/pyperf/pyperf-% BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives Recommends: python-psutil BuildArch: noarch # SECTION test requirements @@ -48,15 +50,22 @@ Python module to run and analyze benchmarks. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pyperf %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative pyperf + +%postun +%python_uninstall_alternative pyperf + %files %{python_files} %doc README.rst %license COPYING -%python3_only %{_bindir}/pyperf +%python_alternative %{_bindir}/pyperf %{python_sitelib}/* %changelog