File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -503,15 +503,13 @@ def venv(known_paths):
503503 executable = os .environ ['__PYVENV_LAUNCHER__' ]
504504 else :
505505 executable = sys .executable
506- executable_dir , executable_name = os .path .split (executable )
507- site_prefix = os .path .dirname (executable_dir )
506+ exe_dir , _ = os .path .split (os . path . abspath ( executable ) )
507+ site_prefix = os .path .dirname (exe_dir )
508508 sys ._home = None
509- if sys .platform == 'win32' :
510- executable_name = os .path .splitext (executable_name )[0 ]
511509 conf_basename = 'pyvenv.cfg'
512510 candidate_confs = [
513511 conffile for conffile in (
514- os .path .join (executable_dir , conf_basename ),
512+ os .path .join (exe_dir , conf_basename ),
515513 os .path .join (site_prefix , conf_basename )
516514 )
517515 if os .path .isfile (conffile )
You can’t perform that action at this time.
0 commit comments