diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-11-23 19:21:46 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-11-23 19:21:46 (GMT) |
commit | 70adf6f72f5892927bc5ade3e430c9e80ea6b592 (patch) | |
tree | 29d8b740a11595d36f537b7797e79ea45f89c695 /Lib/site.py | |
parent | ff790aac6613b5e6e894a3113876c800012863b3 (diff) | |
parent | 27e4b6059e6414d88c7284bbcccebb55b0957bc5 (diff) | |
download | cpython-70adf6f72f5892927bc5ade3e430c9e80ea6b592.zip cpython-70adf6f72f5892927bc5ade3e430c9e80ea6b592.tar.gz cpython-70adf6f72f5892927bc5ade3e430c9e80ea6b592.tar.bz2 |
Closes #16519: Merged fix from 3.3.
Diffstat (limited to 'Lib/site.py')
-rw-r--r-- | Lib/site.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/site.py b/Lib/site.py index 41bea42..5d63c75 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -484,15 +484,13 @@ def venv(known_paths): executable = os.environ['__PYVENV_LAUNCHER__'] else: executable = sys.executable - executable_dir, executable_name = os.path.split(executable) - site_prefix = os.path.dirname(executable_dir) + exe_dir, _ = os.path.split(os.path.abspath(executable)) + site_prefix = os.path.dirname(exe_dir) sys._home = None - if sys.platform == 'win32': - executable_name = os.path.splitext(executable_name)[0] conf_basename = 'pyvenv.cfg' candidate_confs = [ conffile for conffile in ( - os.path.join(executable_dir, conf_basename), + os.path.join(exe_dir, conf_basename), os.path.join(site_prefix, conf_basename) ) if os.path.isfile(conffile) |