mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #3331 from yagebu/python-no-cwd-import
python: remove current working directory from path
This commit is contained in:
commit
6bcbb18dc8
@ -54,7 +54,7 @@ function! s:check_interpreter(prog, major_ver, skip) abort
|
|||||||
|
|
||||||
" Try to load neovim module, and output Python version.
|
" Try to load neovim module, and output Python version.
|
||||||
let prog_ver = system([ a:prog , '-c' ,
|
let prog_ver = system([ a:prog , '-c' ,
|
||||||
\ 'import sys; sys.stdout.write(str(sys.version_info[0]) + '.
|
\ 'import sys; sys.path.remove(""); sys.stdout.write(str(sys.version_info[0]) + '.
|
||||||
\ '"." + str(sys.version_info[1])); '.
|
\ '"." + str(sys.version_info[1])); '.
|
||||||
\ (a:major_ver == 2
|
\ (a:major_ver == 2
|
||||||
\ ? 'import pkgutil; exit(pkgutil.get_loader("neovim") is None)'
|
\ ? 'import pkgutil; exit(pkgutil.get_loader("neovim") is None)'
|
||||||
|
@ -197,7 +197,7 @@ function! s:RequirePythonHost(host)
|
|||||||
let ver = (a:host.orig_name ==# 'python') ? 2 : 3
|
let ver = (a:host.orig_name ==# 'python') ? 2 : 3
|
||||||
|
|
||||||
" Python host arguments
|
" Python host arguments
|
||||||
let args = ['-c', 'import neovim; neovim.start_host()']
|
let args = ['-c', 'import sys; sys.path.remove(""); import neovim; neovim.start_host()']
|
||||||
|
|
||||||
" Collect registered Python plugins into args
|
" Collect registered Python plugins into args
|
||||||
let python_plugins = remote#host#PluginsForHost(a:host.name)
|
let python_plugins = remote#host#PluginsForHost(a:host.name)
|
||||||
|
Loading…
Reference in New Issue
Block a user