-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
Lines 50 to 54 in 2370340
if not loc.is_absolute(): | |
try: | |
loc = loc.resolve() | |
except OSError: | |
loc = loc.absolute() |
Lines 508 to 519 in 2370340
def dist_is_in_project(self, dist): | |
"""Determine whether the supplied distribution is in the environment.""" | |
from .project import _normalized | |
prefixes = [ | |
_normalized(prefix) for prefix in self.base_paths["libdirs"].split(os.pathsep) | |
if _normalized(prefix).startswith(_normalized(self.prefix.as_posix())) | |
] | |
location = self.locate_dist(dist) | |
if not location: | |
return False | |
location = _normalized(make_posix(location)) | |
return any(location.startswith(prefix) for prefix in prefixes) |
The path is never resolved if it is an absolute path with symlinked parts. It is often the case with Linux, where the virtualenv home is symlinked to ~/.local/share/
, then dist_is_in_project
will always return false.
Remove the is_absolute
check in _normalize
funciton can make it work.
More info FWIW: I have virtualenvwrapper
installed and WORKON_HOME
set to ~/.virtualenvs
Metadata
Metadata
Assignees
Labels
No labels