From 66f28c00f4ee2f32c765e34617c7aaa5e92a19c7 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 | 2 ++ resources/macos/make_pkg.sh | 7 ++++++- resources/macos/make_release.sh | 3 --- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml index 52f4039a..52264f61 100644 --- a/.github/workflows/macOS.yml +++ b/.github/workflows/macOS.yml @@ -46,6 +46,8 @@ jobs: - name: PyInstaller run: | poetry run pyinstaller ykman.spec + cp --remove-destination $(readlink "dist/ykman/_internal/Python") dist/ykman/_internal/Python + rm -rf dist/ykman/_internal/Python.framework dist/ykman/ykman --version [[ -z "$(dist/ykman/ykman --version | grep -E "not found|missing")" ]] 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"