Skip to content

Commit 6080827

Browse files
Debug macos build
1 parent 332de37 commit 6080827

2 files changed

Lines changed: 45 additions & 17 deletions

File tree

.github/workflows/release.yml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,50 @@ jobs:
203203
PIP_EXTRA_INDEX_URL: ""
204204
PIP_NO_CACHE_DIR: "1"
205205
run: |
206-
set -euo pipefail
207-
uv run briefcase create -v || {
208-
status=$?
209-
echo "Briefcase create failed; dumping saved create log if present..."
210-
ls -la logs || true
206+
set -uo pipefail
207+
208+
probe_support_python() {
209+
echo "---- Probing Briefcase macOS support-package Python ----"
210+
# Briefcase unpacks the support package BEFORE running pip install, so even
211+
# when `briefcase create` fails the interpreter should already be on disk.
212+
support_python=$(find build -type f \( -name 'python3' -o -name 'python3.12' -o -name 'python3.13' -o -name 'python3.14' \) -path '*Support*' 2>/dev/null | head -n 1 || true)
213+
if [ -z "${support_python}" ]; then
214+
echo "No support-package Python found under build/ (searching more broadly)..."
215+
find build -maxdepth 8 -type f -name 'python3*' 2>/dev/null | head -n 20 || true
216+
return 0
217+
fi
218+
echo "Support python: ${support_python}"
219+
"${support_python}" -V || true
220+
"${support_python}" -c "import sys, sysconfig; print('sys.platform:', sys.platform); print('sysconfig.get_platform:', sysconfig.get_platform()); print('MACOSX_DEPLOYMENT_TARGET:', sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')); print('executable:', sys.executable); print('prefix:', sys.prefix)" || true
221+
# Full list of platform tags the support-package pip will accept.
222+
"${support_python}" -c "from pip._internal.utils.compatibility_tags import get_supported; [print(t) for t in get_supported()[:40]]" || true
223+
echo "---- Support-package pip: index versions for PySide6 ----"
224+
"${support_python}" -m pip index versions PySide6 -i https://pypi.org/simple || true
225+
echo "---- Support-package pip: dry-run install PySide6==6.11.0 ----"
226+
"${support_python}" -m pip install --dry-run --index-url https://pypi.org/simple "pyside6==6.11.0" -vvv 2>&1 | sed -n '1,80p' || true
227+
echo "---- End support-package probe ----"
228+
}
229+
230+
uv run briefcase create -v
231+
status=$?
232+
if [ "${status}" -ne 0 ]; then
233+
echo "Briefcase create failed (exit ${status}); running support-package probe..."
234+
probe_support_python
235+
echo "Briefcase saved log (if any):"
236+
ls -la logs 2>/dev/null || true
211237
latest_log=$(ls -1t logs/briefcase.*.create.log 2>/dev/null | head -n 1 || true)
212238
if [ -n "${latest_log}" ]; then
213239
echo "---- Begin ${latest_log} ----"
214240
sed -n '1,260p' "${latest_log}" || true
215241
echo "---- End ${latest_log} ----"
216242
fi
217243
exit "${status}"
218-
}
244+
fi
245+
246+
# Create succeeded: probe anyway (cheap) so we can confirm the fix landed.
247+
probe_support_python
248+
249+
set -e
219250
uv run briefcase build -v
220251
uv run briefcase package -v -p dmg
221252

pyproject.toml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,11 @@ requirement_installer_args = [
169169

170170
[tool.briefcase.app.dbs_annotator.macOS]
171171
universal_build = false
172-
# Work around Briefcase macOS create-time resolver failures with constrained PySide6.
173-
# Keep global constraints for other platforms; on macOS rely on direct project requirements.
174-
requirement_installer_args = [
175-
"--index-url",
176-
"https://pypi.org/simple",
177-
"--retries",
178-
"5",
179-
"--timeout",
180-
"60",
181-
"--no-cache-dir",
182-
]
172+
# PySide6 6.8+ publishes macOS wheels tagged `macosx_13_0_universal2`. The Briefcase
173+
# support-package Python on macOS advertises a lower platform tag by default, so its
174+
# embedded pip refuses all PySide6 versions newer than 6.7.3 with a misleading
175+
# "No matching distribution" error. Setting `min_os_version = "13.0"` tells Briefcase
176+
# (and the bundled interpreter/installer) to target macOS 13+, aligning platform tags
177+
# with the published wheels. If a compatible support package is not available, Briefcase
178+
# will select the closest one and raise the deployment target accordingly.
179+
min_os_version = "13.0"

0 commit comments

Comments
 (0)