mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-28 21:52:09 +08:00
Improve virtualenv support & egg-link resolution
- add sys_path= kwarg to Script & Evaluator constructors - store sys_path for each evaluator instance - replace get_sys_path with get_venv_path - get_venv_path: use addsitedir to load .pth extension files - get_venv_path: look for egg-link files in all directories in path
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
# This file is here to force git to create the directory, as *.pth files only
|
||||
# add existing directories.
|
||||
@@ -0,0 +1 @@
|
||||
/path/from/egg-link
|
||||
@@ -0,0 +1 @@
|
||||
./dir-from-foo-pth
|
||||
@@ -0,0 +1 @@
|
||||
import smth; smth.extend_path()
|
||||
@@ -0,0 +1 @@
|
||||
./relative/egg-link/path
|
||||
@@ -0,0 +1,6 @@
|
||||
import sys
|
||||
sys.path.append('/path/from/smth.py')
|
||||
|
||||
|
||||
def extend_path():
|
||||
sys.path.append('/path/from/smth.py:extend_path')
|
||||
@@ -0,0 +1,2 @@
|
||||
# This file is here to force git to create the directory, as *.pth files only
|
||||
# add existing directories.
|
||||
@@ -0,0 +1 @@
|
||||
/path/from/egg-link
|
||||
@@ -0,0 +1 @@
|
||||
./dir-from-foo-pth
|
||||
@@ -0,0 +1 @@
|
||||
import smth; smth.extend_path()
|
||||
@@ -0,0 +1 @@
|
||||
./relative/egg-link/path
|
||||
@@ -0,0 +1,6 @@
|
||||
import sys
|
||||
sys.path.append('/path/from/smth.py')
|
||||
|
||||
|
||||
def extend_path():
|
||||
sys.path.append('/path/from/smth.py:extend_path')
|
||||
Reference in New Issue
Block a user