File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,11 @@ MACHINE_SIMPLE-arm64_32=arm
106
106
# The architecture of the machine doing the build
107
107
HOST_ARCH =$(shell uname -m)
108
108
109
+ # Force the path to be minimal. This ensures that anything in the user environment
110
+ # (in particular, homebrew and user-provided Python installs) aren't inadvertently
111
+ # linked into the support package.
112
+ PATH =/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
113
+
109
114
# Build for all operating systems
110
115
all : $(OS_LIST )
111
116
@@ -131,9 +136,15 @@ downloads: \
131
136
132
137
update-patch :
133
138
# Generate a diff from the clone of the python/cpython Github repository
134
- # Requireds patchutils (installable via `brew install patchutils`)
139
+ # Requires patchutils (installable via `brew install patchutils`); this
140
+ # also means we need to re-introduce homebrew to the path for the filterdiff
141
+ # call
135
142
if [ -z " $( PYTHON_REPO_DIR) " ]; then echo " \n\nPYTHON_REPO_DIR must be set to the root of your Python github checkout\n\n" ; fi
136
- cd $(PYTHON_REPO_DIR ) && git diff -D v$(PYTHON_VERSION ) $(PYTHON_VER ) | filterdiff -X $(PROJECT_DIR ) /patch/Python/diff.exclude -p 1 --clean > $(PROJECT_DIR ) /patch/Python/Python.patch
143
+ cd $(PYTHON_REPO_DIR ) && \
144
+ git diff -D v$(PYTHON_VERSION ) $(PYTHON_VER ) \
145
+ | PATH=" /usr/local/bin:/opt/homebrew/bin:$( PATH) " filterdiff \
146
+ -X $(PROJECT_DIR ) /patch/Python/diff.exclude -p 1 --clean \
147
+ > $(PROJECT_DIR ) /patch/Python/Python.patch
137
148
138
149
# ##########################################################################
139
150
# Setup: BZip2
You can’t perform that action at this time.
0 commit comments