From ea723b61de9e1caae13cd150d23237d125ed5568 Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Mon, 24 Jun 2024 16:16:23 +0200 Subject: [PATCH] Remove Python.framework in workflow --- .github/workflows/macOS.yml | 6 ++++++ resources/macos/make_pkg.sh | 7 ++++++- resources/macos/make_release.sh | 3 --- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml index 52f4039a..bca95cfa 100644 --- a/.github/workflows/macOS.yml +++ b/.github/workflows/macOS.yml @@ -49,6 +49,12 @@ jobs: dist/ykman/ykman --version [[ -z "$(dist/ykman/ykman --version | grep -E "not found|missing")" ]] + - name: Simplify Python bundle + working-directory: ./dist/ykman/_internal + run: | + mv $(readlink Python) Python + rm -rf Python.framework + - name: Copy scripts shell: bash run: cp -r resources/macos dist/scripts diff --git a/resources/macos/make_pkg.sh b/resources/macos/make_pkg.sh index 1d12f294..6e12eacd 100755 --- a/resources/macos/make_pkg.sh +++ b/resources/macos/make_pkg.sh @@ -22,8 +22,13 @@ set -x cd $SCRIPT_DIR +# Ensure executable, since we may have unpacked from zip +chmod +x pkg_scripts/* + mkdir -p pkg/root/usr/local/bin pkg/comp -cp -r $SOURCE_DIR pkg/root/usr/local/ +cp -R $SOURCE_DIR pkg/root/usr/local/ + +# Create a symlink to the main binary that is on the PATH (cd pkg/root/usr/local/bin && ln -s ../ykman/ykman) pkgbuild --root="pkg/root" --scripts="pkg_scripts" --identifier "com.yubico.yubikey-manager" --version "$RELEASE_VERSION" "pkg/comp/ykman.pkg" diff --git a/resources/macos/make_release.sh b/resources/macos/make_release.sh index 50dbd0ed..5e2739d3 100755 --- a/resources/macos/make_release.sh +++ b/resources/macos/make_release.sh @@ -19,9 +19,6 @@ SOURCE_DIR="$CWD/ykman" # Ensure executable, since we may have unpacked from zip chmod +x $SOURCE_DIR/ykman -# Remove Python framework directory as it isn't needed -rm -rf $SOURCE_DIR/_internal/Python.framework - RELEASE_VERSION=`$SOURCE_DIR/ykman --version | awk '{print $(NF)}'` PKG="yubikey-manager-$RELEASE_VERSION-mac.pkg"