diff --git a/SubstratalHub.xcodeproj/xcshareddata/xcschemes/SubstratalHub.xcscheme b/SubstratalHub.xcodeproj/xcshareddata/xcschemes/SubstratalHub.xcscheme index 9331582..121556f 100644 --- a/SubstratalHub.xcodeproj/xcshareddata/xcschemes/SubstratalHub.xcscheme +++ b/SubstratalHub.xcodeproj/xcshareddata/xcschemes/SubstratalHub.xcscheme @@ -5,6 +5,7 @@ /dev/null || python3 -m pip install --quiet --user pyyaml -python3 scripts/derive-openapi.py "$UPSTREAM" "$DERIVED" +# PyYAML goes in a private venv when the system Python lacks it: Homebrew's Python (the macOS runners') +# refuses `pip install --user` under PEP 668. +PYTHON=python3 +if ! python3 -c "import yaml" 2>/dev/null; then + PYTHON=.build/pyvenv/bin/python3 + [[ -x "$PYTHON" ]] || python3 -m venv .build/pyvenv + "$PYTHON" -c "import yaml" 2>/dev/null || "$PYTHON" -m pip install --quiet pyyaml +fi +"$PYTHON" scripts/derive-openapi.py "$UPSTREAM" "$DERIVED" python3 - "$UPSTREAM" "$SOURCE" <<'PY' import hashlib, json, re, sys, datetime