-
Notifications
You must be signed in to change notification settings - Fork 30
mostly dep updates, remove bad option to RP #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,10 @@ | |
# Adaptd from https://github.com/munki/munki/blob/Munki3dev/code/tools/build_python_framework.sh | ||
# IMPORTANT | ||
# Run this with your current directory being the path where this script is located | ||
|
||
# Harcoded versions | ||
RP_SHA="fb4dd9b024b249c71713f14d887f4bcea78aa8b0" | ||
MP_SHA="0fcd47faf0fb2b4e8a0256a77be315a3cb6ab319" | ||
# set -x | ||
# Harcoded (commit) versions of relocatable-python & munki-pkg | ||
RP_SHA="8ee72fe3a5dbef733365370ebf44f25022b895ef" # https://github.com/gregneagle/relocatable-python/commits/main/ | ||
MP_SHA="96cffb4eac9207c1130404ec1fee8f4777fa38fd" # https://github.com/munki/munki-pkg/commits/main/ | ||
MACOS_VERSION=11 # use 10.9 for non-universal | ||
PYTHON_PRERELEASE_VERSION= | ||
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" | |
MP_BINDIR="/tmp/munki-pkg" | ||
CONSOLEUSER=$(/usr/bin/stat -f "%Su" /dev/console) | ||
PIPCACHEDIR="/Users/${CONSOLEUSER}/Library/Caches/pip" | ||
XCODE_PATH="/Applications/Xcode_15.2.app" | ||
XCODE_PATH="/Applications/Xcode.app" | ||
XCODE_BUILD_PATH="$XCODE_PATH/Contents/Developer/usr/bin/xcodebuild" | ||
XCODE_NOTARY_PATH="$XCODE_PATH/Contents/Developer/usr/bin/notarytool" | ||
XCODE_STAPLER_PATH="$XCODE_PATH/Contents/Developer/usr/bin/stapler" | ||
NEWSUBBUILD=$((80620 + $(/usr/bin/git rev-parse HEAD~0 | xargs -I{} /usr/bin/git rev-list --count {}))) | ||
|
@@ -56,13 +57,13 @@ fi | |
if [ -n "$4" ]; then | ||
PYTHON_VERSION=$4 | ||
else | ||
PYTHON_VERSION=3.12.1 | ||
PYTHON_VERSION=3.13.5 | ||
fi | ||
|
||
if [ -n "$5" ]; then | ||
PYTHON_MAJOR_VERSION=$5 | ||
else | ||
PYTHON_MAJOR_VERSION=3.12 | ||
PYTHON_MAJOR_VERSION=3.13 | ||
fi | ||
# Set python bin version based on PYTHON_VERSION | ||
PYTHON_BIN_VERSION="${PYTHON_VERSION%.*}" | ||
|
@@ -141,18 +142,7 @@ else | |
fi | ||
|
||
# make a symbolic link to help with interactive use | ||
if [[ "${PYTHON_MAJOR_VERSION}" == "3.9" ]]; then | ||
/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_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3" | ||
fi | ||
if [[ "${PYTHON_MAJOR_VERSION}" == "3.11" ]]; then | ||
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3" | ||
fi | ||
if [[ "${PYTHON_MAJOR_VERSION}" == "3.12" ]]; then | ||
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3" | ||
fi | ||
/bin/ln -s "$PYTHON_BIN_NEW" "$TOOLSDIR/$TYPE/payload/usr/local/bin/managed_python3" | ||
|
||
SB_RESULT="$?" | ||
if [ "${SB_RESULT}" != "0" ]; then | ||
|
@@ -166,14 +156,13 @@ fi | |
# C_INCLUDE_PATH="/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/Current/Headers/" | ||
|
||
export C_INCLUDE_PATH="/Library/ManagedFrameworks/Python/Python.framework/Versions/Current/Headers/" | ||
|
||
C_INCLUDE_PATH="/Library/ManagedFrameworks/Python/Python.framework/Versions/Current/Headers/" RP_EXTRACT_BINDIR="${RP_BINDIR}/relocatable-python-${RP_SHA}" | ||
|
||
"${RP_EXTRACT_BINDIR}/make_relocatable_python_framework.py" \ | ||
--baseurl "${PYTHON_BASEURL}" \ | ||
--python-version "${PYTHON_VERSION}" \ | ||
--os-version "${MACOS_VERSION}" \ | ||
--upgrade-pip \ | ||
--no-unsign \ | ||
--pip-requirements "${TOOLSDIR}/requirements_${TYPE}.txt" \ | ||
--destination "${FRAMEWORKDIR}" | ||
|
||
|
@@ -235,7 +224,7 @@ else | |
/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 {} \; | ||
/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" | ||
/usr/bin/codesign -s - --force --preserve-metadata=identifier,entitlements,flags,runtime "$TOOLSDIR/$TYPE/payload${FRAMEWORKDIR}/Python3.framework/Versions/${PYTHON_BIN_VERSION}/Python" | ||
/usr/bin/codesign -s - --force --preserve-metadata=identifier,entitlements,flags,runtime "$TOOLSDIR/$TYPE/payload${FRAMEWORKDIR}Python3.framework/Versions/Current/Python" | ||
/usr/bin/codesign -s - --force --preserve-metadata=identifier,entitlements,flags,runtime "$TOOLSDIR/$TYPE/payload${FRAMEWORKDIR}/Python3.framework/Versions/Current/Python" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this doing? I think the This seems like an out of scope change, so let's keep this as tidy as we can, let the CI/CD cut a build and then adjust as needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it will almost certainly fail as-is, as per the lines directly preceding where there isn't the trailing forwardslash in the var... your call There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I should be honest and say I don't know if it will have any effect on the signing of that exact path in the payload/as installed) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This worked the last time we ran it, so I have to assume its something silly in the github action :D Speaking of which, you'll want to copy this: https://github.com/macadmins/python/blob/main/.github/workflows/build_python_3.12.yml And update it for 3.13 as well. |
||
fi | ||
|
||
# Print out some information about the signatures | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
cffi==1.16.0 | ||
cffi==1.17.1 | ||
--no-binary cffi | ||
pycparser==2.21 | ||
pyobjc==10.1 | ||
pyobjc==11.1 | ||
six==1.16.0 | ||
xattr==1.0.0 | ||
xattr==1.1.4 | ||
--no-binary xattr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I knew there had to be a reason for this: https://github.com/macadmins/python/blob/main/.github/workflows/build_python_3.12.yml
Looks liker there is a workflow for each major Python 3 version, so removing this will break the other build files. I'd add 'em back for now.
If you have the energy to refactor later, I'd entertain that.