From f2cf09704d79b31a58bcb852f176a8df367ebc90 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Mon, 22 Apr 2024 07:49:04 +0200 Subject: [PATCH 1/3] PICARD-2192: Use universal2 binary of libdiscid for macOS builds --- scripts/package/macos-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package/macos-setup.sh b/scripts/package/macos-setup.sh index ef512f3f97..d23e37df7a 100755 --- a/scripts/package/macos-setup.sh +++ b/scripts/package/macos-setup.sh @@ -20,7 +20,7 @@ if [ -n "$DISCID_VERSION" ]; then wget "ftp://ftp.musicbrainz.org/pub/musicbrainz/libdiscid/$DISCID_FILENAME" echo "$DISCID_SHA256SUM $DISCID_FILENAME" | shasum --algorithm 256 --check --status unzip "$DISCID_FILENAME" - cp "libdiscid-$DISCID_VERSION-mac/x86_64/libdiscid.0.dylib" . + cp "libdiscid-$DISCID_VERSION-mac/universal2/libdiscid.0.dylib" . fi # Install fpcalc From 70bfc72089c4b1e4e31c7713124b5ba98c96446d Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Mon, 22 Apr 2024 08:14:20 +0200 Subject: [PATCH 2/3] PICARD-2192: Build universal2 macOS packages for ARM (Apple Silicon) support --- .github/workflows/package-macos.yml | 2 +- picard.spec | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package-macos.yml b/.github/workflows/package-macos.yml index 98d8172e7f..08825ac1de 100644 --- a/.github/workflows/package-macos.yml +++ b/.github/workflows/package-macos.yml @@ -45,7 +45,7 @@ jobs: - name: Install dependencies run: | pip3 install -r requirements-build.txt - pip3 install -r requirements-macos-${MACOSX_DEPLOYMENT_TARGET}.txt + pip3 install --no-binary "charset-normalizer,PyYAML" -r requirements-macos-${MACOSX_DEPLOYMENT_TARGET}.txt env: PYINSTALLER_COMPILE_BOOTLOADER: "1" - name: Run tests diff --git a/picard.spec b/picard.spec index 54c5ec57fe..ba3b13332d 100644 --- a/picard.spec +++ b/picard.spec @@ -106,6 +106,7 @@ else: exe = EXE(pyz, a.scripts, exclude_binaries=True, + target_arch='universal2' if os_name == 'Darwin' else None, # Avoid name clash between picard executable and picard module folder name='picard' if os_name == 'Windows' else 'picard-run', debug=False, From 7ad428cf1b61f2d75d3e660e9dac04de1d9a94b8 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Mon, 22 Apr 2024 08:19:27 +0200 Subject: [PATCH 3/3] Update Python version for macOS build to 3.12.3 --- .github/workflows/package-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package-macos.yml b/.github/workflows/package-macos.yml index 08825ac1de..4d745d4c84 100644 --- a/.github/workflows/package-macos.yml +++ b/.github/workflows/package-macos.yml @@ -11,8 +11,8 @@ jobs: matrix: setup: - macos-deployment-version: 11 - python-version: 3.12.1-macos11 - python-sha256sum: 6178e42679eb83196240fc58b1438f481c32c2b0557f28ccf43aa7b1b80b7c4a + python-version: 3.12.3-macos11 + python-sha256sum: 70a701542ff297760ac5e20f81d0e610aaaa1aba016e411788aa80029e571c5e env: DISCID_VERSION: 0.6.4 DISCID_SHA256SUM: 829133dd38acbdaa2b989de59e256c8d139ac34cb4dd4b8fd3c9d55a97c824f3