@@ -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
0 commit comments