jedi#debug_info: check that PythonJedi can be called

This commit is contained in:
Daniel Hahler
2017-01-14 20:21:51 +01:00
parent 4baf4b27f7
commit 636d393114

View File

@@ -168,10 +168,21 @@ function! jedi#debug_info()
endif endif
echo 'Using Python version:' s:python_version echo 'Using Python version:' s:python_version
let pyeval = s:python_version == 3 ? 'py3eval' : 'pyeval' let pyeval = s:python_version == 3 ? 'py3eval' : 'pyeval'
PythonJedi print(' - sys.version: {0}'.format(', '.join([x.strip() for x in __import__('sys').version.split("\n")]))) let s:pythonjedi_called = 0
PythonJedi print(' - site module: {0}'.format(__import__('site').__file__)) PythonJedi import vim; vim.command('let s:pythonjedi_called = 1')
PythonJedi print('Jedi path: {0}'.format(jedi_vim.jedi.__file__)) if !s:pythonjedi_called
PythonJedi print('Jedi version: {}'.format(jedi_vim.jedi.__version__)) echohl WarningMsg
echom 'PythonJedi failed to run, likely a Python config issue.'
if exists(':CheckHealth') == 2
echom 'Try :CheckHealth for more information.'
endif
echohl None
else
PythonJedi print(' - sys.version: {0}'.format(', '.join([x.strip() for x in __import__('sys').version.split("\n")])))
PythonJedi print(' - site module: {0}'.format(__import__('site').__file__))
PythonJedi print('Jedi path: {0}'.format(jedi_vim.jedi.__file__))
PythonJedi print('Jedi version: {}'.format(jedi_vim.jedi.__version__))
endif
echo 'jedi-vim git version: ' echo 'jedi-vim git version: '
echon substitute(system('git -C '.s:script_path.' describe --tags --always --dirty'), '\v\n$', '', '') echon substitute(system('git -C '.s:script_path.' describe --tags --always --dirty'), '\v\n$', '', '')
echo 'jedi git submodule status: ' echo 'jedi git submodule status: '