Skip to content

Commit bd11c6a

Browse files
committed
unix: document why PATH is set when building on macOS
1 parent 1fa9215 commit bd11c6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cpython-unix/build.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ def add_target_env(env, build_platform, target_triple, build_env):
122122
sdk_platform = settings["apple_sdk_platform"]
123123

124124
env["TARGET_TRIPLE"] = target_triple
125+
126+
# We don't have build isolation on macOS. We nerf PATH to prevent
127+
# non-system (e.g. Homebrew) executables from being used.
125128
env["PATH"] = "/usr/bin:/bin"
126129

127130
extra_target_cflags.extend(

0 commit comments

Comments
 (0)