Skip to content

Commit 77aeff4

Browse files
committed
Keep base_prefix and base_exec_prefix from PyConfig if set
Signed-off-by: Filipe Laíns <[email protected]>
1 parent c5b7d63 commit 77aeff4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Modules/getpath.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,10 @@ def search_up(prefix, *landmarks, test=isfile):
641641

642642
# For a venv, update the main prefix/exec_prefix but leave the base ones unchanged
643643
if venv_prefix:
644-
base_prefix = prefix
645-
base_exec_prefix = exec_prefix
644+
if not base_prefix:
645+
base_prefix = prefix
646+
if not base_exec_prefix:
647+
base_exec_prefix = exec_prefix
646648
prefix = exec_prefix = venv_prefix
647649

648650

0 commit comments

Comments
 (0)