Skip to content

Commit cd4759d

Browse files
authored
Attempt to use new python bin path for symlinks (#58)
1 parent 34dc783 commit cd4759d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

build_python_framework_pkgs.zsh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ PYTHON_BASEURL="https://www.python.org/ftp/python/%s/python-%s${PYTHON_PRERELEAS
1414
# Hardcoded paths
1515
FRAMEWORKDIR="/Library/ManagedFrameworks/Python"
1616
PYTHON_BIN="$FRAMEWORKDIR/Python3.framework/Versions/Current/bin/python3"
17+
PYTHON_BIN_NEW="$FRAMEWORKDIR/Python3.framework/Versions/Current/Resources/Python.app/Contents/MacOS/Python"
1718
RP_BINDIR="/tmp/relocatable-python"
1819
MP_BINDIR="/tmp/munki-pkg"
1920
CONSOLEUSER=$(/usr/bin/stat -f "%Su" /dev/console)
@@ -141,16 +142,18 @@ fi
141142

142143
# make a symbolic link to help with interactive use
143144
if [[ "${PYTHON_MAJOR_VERSION}" == "3.9" ]]; then
144-
/bin/ln -s "$PYTHON_BIN" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
145+
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
145146
fi
146147
if [[ "${PYTHON_MAJOR_VERSION}" == "3.10" ]]; then
147-
/bin/ln -s "$PYTHON_BIN" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
148+
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
148149
fi
149150
if [[ "${PYTHON_MAJOR_VERSION}" == "3.11" ]]; then
150-
/bin/cp "$TOOLSDIR/python-$PYTHON_MAJOR_VERSION" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
151+
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
152+
# /bin/cp "$TOOLSDIR/python-$PYTHON_MAJOR_VERSION" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
151153
fi
152154
if [[ "${PYTHON_MAJOR_VERSION}" == "3.12" ]]; then
153-
/bin/cp "$TOOLSDIR/python-$PYTHON_MAJOR_VERSION" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
155+
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
156+
# /bin/cp "$TOOLSDIR/python-$PYTHON_MAJOR_VERSION" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
154157
fi
155158

156159
SB_RESULT="$?"

0 commit comments

Comments
 (0)