1
0
forked from VimPlug/jedi

Merge branch 'master' of github.com:davidhalter/jedi

This commit is contained in:
Dave Halter
2018-03-23 00:57:40 +01:00
2 changed files with 15 additions and 5 deletions

View File

@@ -189,10 +189,15 @@ def _get_executable_path(path, safe=True):
Returns None if it's not actually a virtual env.
"""
bin_name = 'Scripts' if os.name == 'nt' else 'bin'
if os.name == 'nt':
bin_name = 'Scripts'
extension = '.exe'
else:
bin_name = 'bin'
extension = ''
bin_folder = os.path.join(path, bin_name)
activate = os.path.join(bin_folder, 'activate')
python = os.path.join(bin_folder, 'python')
python = os.path.join(bin_folder, 'python' + extension)
if not all(os.path.exists(p) for p in (activate, python)):
raise InvalidPythonEnvironment("One of bin/activate and bin/python is missing.")