Skip to content

Commit cb6587a

Browse files
committed
mostly dep updates, remove bad option to RP
--no-unsign was the culprit stopping pip from updating and several of the old pip versions weren't installing cleanly, bumped those versions and sha's of RP/MP among other minor tweaks.
1 parent 5e5340a commit cb6587a

2 files changed

Lines changed: 16 additions & 27 deletions

File tree

build_python_framework_pkgs.zsh

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# Adaptd from https://github.com/munki/munki/blob/Munki3dev/code/tools/build_python_framework.sh
55
# IMPORTANT
66
# Run this with your current directory being the path where this script is located
7-
8-
# Harcoded versions
9-
RP_SHA="fb4dd9b024b249c71713f14d887f4bcea78aa8b0"
10-
MP_SHA="0fcd47faf0fb2b4e8a0256a77be315a3cb6ab319"
7+
# set -x
8+
# Harcoded (commit) versions of relocatable-python & munki-pkg
9+
RP_SHA="8ee72fe3a5dbef733365370ebf44f25022b895ef" # https://github.com/gregneagle/relocatable-python/commits/main/
10+
MP_SHA="96cffb4eac9207c1130404ec1fee8f4777fa38fd" # https://github.com/munki/munki-pkg/commits/main/
1111
MACOS_VERSION=11 # use 10.9 for non-universal
1212
PYTHON_PRERELEASE_VERSION=
1313
PYTHON_BASEURL="https://www.python.org/ftp/python/%s/python-%s${PYTHON_PRERELEASE_VERSION}-macos%s.pkg"
@@ -19,7 +19,8 @@ RP_BINDIR="/tmp/relocatable-python"
1919
MP_BINDIR="/tmp/munki-pkg"
2020
CONSOLEUSER=$(/usr/bin/stat -f "%Su" /dev/console)
2121
PIPCACHEDIR="/Users/${CONSOLEUSER}/Library/Caches/pip"
22-
XCODE_PATH="/Applications/Xcode_15.2.app"
22+
XCODE_PATH="/Applications/Xcode.app"
23+
XCODE_BUILD_PATH="$XCODE_PATH/Contents/Developer/usr/bin/xcodebuild"
2324
XCODE_NOTARY_PATH="$XCODE_PATH/Contents/Developer/usr/bin/notarytool"
2425
XCODE_STAPLER_PATH="$XCODE_PATH/Contents/Developer/usr/bin/stapler"
2526
NEWSUBBUILD=$((80620 + $(/usr/bin/git rev-parse HEAD~0 | xargs -I{} /usr/bin/git rev-list --count {})))
@@ -56,13 +57,13 @@ fi
5657
if [ -n "$4" ]; then
5758
PYTHON_VERSION=$4
5859
else
59-
PYTHON_VERSION=3.12.1
60+
PYTHON_VERSION=3.13.5
6061
fi
6162

6263
if [ -n "$5" ]; then
6364
PYTHON_MAJOR_VERSION=$5
6465
else
65-
PYTHON_MAJOR_VERSION=3.12
66+
PYTHON_MAJOR_VERSION=3.13
6667
fi
6768
# Set python bin version based on PYTHON_VERSION
6869
PYTHON_BIN_VERSION="${PYTHON_VERSION%.*}"
@@ -96,8 +97,8 @@ if [ -d "${PIPCACHEDIR}" ]; then
9697
/usr/bin/sudo /bin/rm -rf "${PIPCACHEDIR}"
9798
fi
9899

99-
# kill homebrew packages
100-
/usr/local/bin/brew remove --force $(/usr/local/bin/brew list)
100+
# # kill homebrew packages
101+
# /usr/local/bin/brew remove --force $(/usr/local/bin/brew list)
101102

102103
# Ensure Xcode is set to run-time
103104
sudo xcode-select -s "$XCODE_PATH"
@@ -141,18 +142,7 @@ else
141142
fi
142143

143144
# make a symbolic link to help with interactive use
144-
if [[ "${PYTHON_MAJOR_VERSION}" == "3.9" ]]; then
145-
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
146-
fi
147-
if [[ "${PYTHON_MAJOR_VERSION}" == "3.10" ]]; then
148-
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
149-
fi
150-
if [[ "${PYTHON_MAJOR_VERSION}" == "3.11" ]]; then
151-
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
152-
fi
153-
if [[ "${PYTHON_MAJOR_VERSION}" == "3.12" ]]; then
154-
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
155-
fi
145+
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3"
156146

157147
SB_RESULT="$?"
158148
if [ "${SB_RESULT}" != "0" ]; then
@@ -166,14 +156,13 @@ fi
166156
# C_INCLUDE_PATH="/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/Current/Headers/"
167157

168158
export C_INCLUDE_PATH="/Library/ManagedFrameworks/Python/Python.framework/Versions/Current/Headers/"
169-
170159
C_INCLUDE_PATH="/Library/ManagedFrameworks/Python/Python.framework/Versions/Current/Headers/" RP_EXTRACT_BINDIR="${RP_BINDIR}/relocatable-python-${RP_SHA}"
160+
171161
"${RP_EXTRACT_BINDIR}/make_relocatable_python_framework.py" \
172162
--baseurl "${PYTHON_BASEURL}" \
173163
--python-version "${PYTHON_VERSION}" \
174164
--os-version "${MACOS_VERSION}" \
175165
--upgrade-pip \
176-
--no-unsign \
177166
--pip-requirements "${TOOLSDIR}/requirements_${TYPE}.txt" \
178167
--destination "${FRAMEWORKDIR}"
179168

@@ -235,7 +224,7 @@ else
235224
/usr/bin/find "$TOOLSDIR/$TYPE/payload${FRAMEWORKDIR}/Python3.framework/Versions/${PYTHON_BIN_VERSION}/lib" -type f -name "*dylib" -exec /usr/bin/codesign -s - --preserve-metadata=identifier,entitlements,flags,runtime -f {} \;
236225
/usr/bin/codesign -s - --deep --force --preserve-metadata=identifier,entitlements,flags,runtime "$TOOLSDIR/$TYPE/payload${FRAMEWORKDIR}/Python3.framework/Versions/${PYTHON_BIN_VERSION}/Resources/Python.app"
237226
/usr/bin/codesign -s - --force --preserve-metadata=identifier,entitlements,flags,runtime "$TOOLSDIR/$TYPE/payload${FRAMEWORKDIR}/Python3.framework/Versions/${PYTHON_BIN_VERSION}/Python"
238-
/usr/bin/codesign -s - --force --preserve-metadata=identifier,entitlements,flags,runtime "$TOOLSDIR/$TYPE/payload${FRAMEWORKDIR}Python3.framework/Versions/Current/Python"
227+
/usr/bin/codesign -s - --force --preserve-metadata=identifier,entitlements,flags,runtime "$TOOLSDIR/$TYPE/payload${FRAMEWORKDIR}/Python3.framework/Versions/Current/Python"
239228
fi
240229

241230
# Print out some information about the signatures

requirements_minimal.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
cffi==1.16.0
1+
cffi==1.17.1
22
--no-binary cffi
33
pycparser==2.21
4-
pyobjc==10.1
4+
pyobjc==11.1
55
six==1.16.0
6-
xattr==1.0.0
6+
xattr==1.1.4
77
--no-binary xattr

0 commit comments

Comments
 (0)