Skip to content

Commit

Permalink
Attempt to use new python bin path for symlinks (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng authored Feb 23, 2024
1 parent 34dc783 commit cd4759d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build_python_framework_pkgs.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ PYTHON_BASEURL="https://www.python.org/ftp/python/%s/python-%s${PYTHON_PRERELEAS
# Hardcoded paths
FRAMEWORKDIR="/Library/ManagedFrameworks/Python"
PYTHON_BIN="$FRAMEWORKDIR/Python3.framework/Versions/Current/bin/python3"
PYTHON_BIN_NEW="$FRAMEWORKDIR/Python3.framework/Versions/Current/Resources/Python.app/Contents/MacOS/Python"
RP_BINDIR="/tmp/relocatable-python"
MP_BINDIR="/tmp/munki-pkg"
CONSOLEUSER=$(/usr/bin/stat -f "%Su" /dev/console)
Expand Down Expand Up @@ -141,16 +142,18 @@ fi

# make a symbolic link to help with interactive use
if [[ "${PYTHON_MAJOR_VERSION}" == "3.9" ]]; then
/bin/ln -s "$PYTHON_BIN" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
fi
if [[ "${PYTHON_MAJOR_VERSION}" == "3.10" ]]; then
/bin/ln -s "$PYTHON_BIN" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
fi
if [[ "${PYTHON_MAJOR_VERSION}" == "3.11" ]]; then
/bin/cp "$TOOLSDIR/python-$PYTHON_MAJOR_VERSION" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
# /bin/cp "$TOOLSDIR/python-$PYTHON_MAJOR_VERSION" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
fi
if [[ "${PYTHON_MAJOR_VERSION}" == "3.12" ]]; then
/bin/cp "$TOOLSDIR/python-$PYTHON_MAJOR_VERSION" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
# /bin/cp "$TOOLSDIR/python-$PYTHON_MAJOR_VERSION" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
fi

SB_RESULT="$?"
Expand Down

0 comments on commit cd4759d

Please sign in to comment.