From f41dec1c5a8ee680dc9fae1ae1625b08acc004d77fa9f0e054734f3a7134be76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 18 May 2020 08:11:53 +0000 Subject: [PATCH] Accepting request 806789 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/806789 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vim-vint?expand=0&rev=9 --- python-vim-vint.changes | 5 +++++ python-vim-vint.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-vim-vint.changes b/python-vim-vint.changes index c7965a4..57902be 100644 --- a/python-vim-vint.changes +++ b/python-vim-vint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 07:25:31 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Apr 20 07:27:28 UTC 2020 - Tomáš Chvátal diff --git a/python-vim-vint.spec b/python-vim-vint.spec index cc20818..a893774 100644 --- a/python-vim-vint.spec +++ b/python-vim-vint.spec @@ -40,6 +40,8 @@ BuildRequires: python-rpm-macros Requires: python-PyYAML >= 3.11 Requires: python-ansicolor >= 0.2.4 Requires: python-chardet >= 2.3.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %if %{with python2} BuildRequires: python-enum34 >= 1.0.4 @@ -71,15 +73,22 @@ sed -i -e '/^#!\//, 1d' vint/_bundles/vimlparser.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/vint %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python setup.py test +%post +%python_install_alternative vint + +%postun +%python_uninstall_alternative vint + %files %{python_files} %license LICENSE.txt %doc README.rst -%python3_only %{_bindir}/vint +%python_alternative %{_bindir}/vint %{python_sitelib}/* %changelog