mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
fix(provider/pythonx): import the correct module
(cherry picked from commit aede22caa9
)
This commit is contained in:
parent
5bf0873d86
commit
25ac45386c
@ -62,7 +62,7 @@ endfunction
|
|||||||
" Returns array: [prog_exitcode, prog_version]
|
" Returns array: [prog_exitcode, prog_version]
|
||||||
function! s:import_module(prog, module) abort
|
function! s:import_module(prog, module) abort
|
||||||
let prog_version = system([a:prog, '-W', 'ignore', '-c', printf(
|
let prog_version = system([a:prog, '-W', 'ignore', '-c', printf(
|
||||||
\ 'import sys, importlib; ' .
|
\ 'import sys, importlib.util; ' .
|
||||||
\ 'sys.path = [p for p in sys.path if p != ""]; ' .
|
\ 'sys.path = [p for p in sys.path if p != ""]; ' .
|
||||||
\ 'sys.stdout.write(str(sys.version_info[0]) + "." + str(sys.version_info[1])); ' .
|
\ 'sys.stdout.write(str(sys.version_info[0]) + "." + str(sys.version_info[1])); ' .
|
||||||
\ 'sys.exit(2 * int(importlib.util.find_spec("%s") is None))',
|
\ 'sys.exit(2 * int(importlib.util.find_spec("%s") is None))',
|
||||||
|
Loading…
Reference in New Issue
Block a user