diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-12-08 23:39:32 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-12-08 23:39:32 +0100 |
commit | 2f4ec8fd66f1889c59061c93c970ac45157f5f7c (patch) | |
tree | 8605d8726f366e78a1700177131a6b9c99dc3cbf | |
parent | newebuild: Stop adding ~x86 on amd64 (diff) | |
download | gentoo-syntax-2f4ec8fd66f1889c59061c93c970ac45157f5f7c.tar.gz gentoo-syntax-2f4ec8fd66f1889c59061c93c970ac45157f5f7c.tar.bz2 gentoo-syntax-2f4ec8fd66f1889c59061c93c970ac45157f5f7c.zip |
gentoo-common: Call python instead of eselect-pythongentoo-syntax-20211208
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@gentoo.org>
-rw-r--r-- | plugin/gentoo-common.vim | 6 |
1 files changed, 1 insertions, 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 |