Commit 70adf6f7 authored by Vinay Sajip's avatar Vinay Sajip

Closes #16519: Merged fix from 3.3.

parents ff790aac 27e4b605
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment