Skip to content

Commit

Permalink
Don't append system PATH to context when finding the python executables
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <[email protected]>
  • Loading branch information
JeanChristopheMorinPerso committed Oct 12, 2023
1 parent 3cc36bc commit bc65e7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rez_pip/rez.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,11 @@ def getPythonExecutables(
[f"{package.name}=={package.version}"]
)

# Make sure that system PATH doens't interfere with the "which" method.
resolvedContext.append_sys_path = False

for trimmedVersion in map(package.version.trim, [2, 1, 0]):
path = resolvedContext.which(f"python{trimmedVersion}")
path = resolvedContext.which(f"python{trimmedVersion}", parent_environ={})
if path:
pythons[str(package.version)] = path
break
Expand Down

0 comments on commit bc65e7b

Please sign in to comment.