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