diff options
| author | Bernát Gábor <bgabor8@bloomberg.net> | 2020-03-19 11:41:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-19 11:41:16 +0000 |
| commit | 8f20134496cdebe4529e3427225fe00d769e8df4 (patch) | |
| tree | 85ec809a815d4b9c469ed1baa8545cc58f70d75b /src/virtualenv/discovery | |
| parent | 84d6108d30016e99d5c3870fc15b4a2b039863eb (diff) | |
| download | virtualenv-8f20134496cdebe4529e3427225fe00d769e8df4.tar.gz | |
Fix relative discovery (#1734)
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
Diffstat (limited to 'src/virtualenv/discovery')
| -rw-r--r-- | src/virtualenv/discovery/py_info.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/virtualenv/discovery/py_info.py b/src/virtualenv/discovery/py_info.py index c04a312..9a612fe 100644 --- a/src/virtualenv/discovery/py_info.py +++ b/src/virtualenv/discovery/py_info.py @@ -229,8 +229,8 @@ class PythonInfo(object): def satisfies(self, spec, impl_must_match): """check if a given specification can be satisfied by the this python interpreter instance""" - if self.executable == spec.path: # if the path is a our own executable path we're done - return True + if spec.path and self.executable == os.path.abspath(spec.path): + return True # if the path is a our own executable path we're done if spec.path is not None: # if path set, and is not our original executable name, this does not match root, _ = os.path.splitext(os.path.basename(self.original_executable)) |
