From f9856803fa88e4314ffed0ce7dca63ba35de2e2fa30dfff1cb105d7f46a3035f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 27 May 2020 14:46:35 +0000 Subject: [PATCH] Accepting request 809587 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809587 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cpplint?expand=0&rev=5 --- python-cpplint.changes | 5 +++++ python-cpplint.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-cpplint.changes b/python-cpplint.changes index fcd5c76..0b411f1 100644 --- a/python-cpplint.changes +++ b/python-cpplint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:36:50 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Wed Apr 1 14:13:44 UTC 2020 - Marketa Calabkova diff --git a/python-cpplint.spec b/python-cpplint.spec index 1ab81f8..5fed946 100644 --- a/python-cpplint.spec +++ b/python-cpplint.spec @@ -29,6 +29,8 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -51,15 +53,22 @@ sed -i 's/--cov-fail-under=75 --cov=cpplint//' setup.cfg %install %python_install +%python_clone -a %{buildroot}%{_bindir}/cpplint %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative cpplint + +%postun +%python_uninstall_alternative cpplint + %files %{python_files} %license LICENSE %doc README.rst -%python3_only %{_bindir}/cpplint +%python_alternative %{_bindir}/cpplint %{python_sitelib}/* %changelog