Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
files: ${{github.workspace}}/outputs/*.pkg

- name: Upload packages
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@v4.6.2
with:
name: packages
path: outputs/
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
files: ${{github.workspace}}/outputs/*.pkg

- name: Upload packages
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@v4.6.2
with:
name: packages
path: outputs/
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
files: ${{github.workspace}}/outputs/*.pkg

- name: Upload packages
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@v4.6.2
with:
name: packages
path: outputs/
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
files: ${{github.workspace}}/outputs/*.pkg

- name: Upload packages
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@v4.6.2
with:
name: packages
path: outputs/
37 changes: 13 additions & 24 deletions build_python_framework_pkgs.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {})))
Expand Down Expand Up @@ -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%.*}"
Expand Down Expand Up @@ -96,8 +97,8 @@ if [ -d "${PIPCACHEDIR}" ]; then
/usr/bin/sudo /bin/rm -rf "${PIPCACHEDIR}"
fi

# kill homebrew packages
/usr/local/bin/brew remove --force $(/usr/local/bin/brew list)
# # kill homebrew packages
# /usr/local/bin/brew remove --force $(/usr/local/bin/brew list)

# Ensure Xcode is set to run-time
sudo xcode-select -s "$XCODE_PATH"
Expand Down Expand Up @@ -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
Expand All @@ -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}"

Expand Down Expand Up @@ -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"
fi

# Print out some information about the signatures
Expand Down
6 changes: 3 additions & 3 deletions requirements_minimal.txt
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
Loading