Skip to content

Commit 814dd94

Browse files
committed
fix: use x64 python for intel macs
1 parent 325e4b3 commit 814dd94

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

.github/workflows/desktop-publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "release"
1+
name: Build and Publish Desktop App
22

33
on:
44
workflow_dispatch:
@@ -18,6 +18,7 @@ jobs:
1818
args: "--target aarch64-apple-darwin"
1919
- platform: "macos-latest" # for Intel based macs.
2020
args: "--target x86_64-apple-darwin"
21+
python-arch: "x64"
2122
- platform: "ubuntu-22.04"
2223
args: ""
2324
- platform: "windows-latest"
@@ -52,6 +53,7 @@ jobs:
5253
uses: actions/setup-python@v5
5354
with:
5455
python-version: "3.12"
56+
architecture: ${{ matrix.python-arch || '' }}
5557

5658
- name: Setup uv
5759
uses: astral-sh/setup-uv@v4

src-tauri/before_build.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,7 @@ fi
3030

3131
# 2. Build backend with PyInstaller
3232
cd "$PROJECT_ROOT"
33-
HOST_TRIPLE="$(rustc -vV | grep 'host:' | awk '{print $2}')"
34-
if [[ "$TARGET_TRIPLE" == "x86_64-apple-darwin" && "$HOST_TRIPLE" == "aarch64-apple-darwin" ]]; then
35-
# PyInstaller can't cross-compile; use Rosetta 2 to produce x86_64 binary on ARM host
36-
echo "Running PyInstaller under Rosetta 2 for x86_64..."
37-
arch -x86_64 uv run pyinstaller backend/syft-space.spec
38-
else
39-
uv run pyinstaller backend/syft-space.spec
40-
fi
33+
uv run pyinstaller backend/syft-space.spec
4134

4235
# 3. Copy backend binary with target triple suffix
4336
mkdir -p src-tauri/target

0 commit comments

Comments
 (0)