commit: 2f4ec8fd66f1889c59061c93c970ac45157f5f7c Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed Dec 8 22:39:32 2021 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Wed Dec 8 22:39:32 2021 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=2f4ec8fd
gentoo-common: Call python instead of eselect-python Call python (through python-exec) in order to determine the preferred value for PYTHON_COMPAT rather than using the obsolete eselect-python tool. Closes: https://github.com/gentoo/gentoo-syntax/issues/35 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> plugin/gentoo-common.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugin/gentoo-common.vim b/plugin/gentoo-common.vim index 1c9f4ed..42b2451 100644 --- a/plugin/gentoo-common.vim +++ b/plugin/gentoo-common.vim @@ -56,13 +56,9 @@ fun! GentooGetPythonTargets() if exists("g:gentoopythontargets") && g:gentoopythontargets != "" return g:gentoopythontargets else - let l:py3 = system("eselect python show --python3") + let l:py3 = system("python -c 'import epython; print(epython.EPYTHON)'") let l:py3 = substitute(l:py3, "\n", "", "g") - if l:py3 == "" - let l:py3 = "python3.8" - endif - let l:pythons = substitute(l:py3, "[.]", "_", "g") let g:gentoopythontargets = l:pythons