Update PRE_COMMIT_HOOK_SCRIPT in readme_sync.py to use virtualenv PYTHON_BIN (resolving Pillow ModuleNotFoundError during git commit hooks on VPS)
This commit is contained in:
1 parent
cb146c38e7
commit
576ac40f25
2 files changed
+13
-6
No files matched your search
@@ -4,7 +4,7 @@
|
|||||||
> **Gitea Commit & Release Telemetry (`v2.17.1` • Namespace `urn:io:hyperstitionstud`)**
|
> **Gitea Commit & Release Telemetry (`v2.17.1` • Namespace `urn:io:hyperstitionstud`)**
|
||||||
> - **Repository Role & Public Route:** Shared PEP 420 Python core library (`hyperstitionstud_io.*`), MCP/REST server, `/quant/`, `/learn/`, `/engineering/`, `/math/`, & `/donate/` webroots → [`https://hyperstitionstud.io/`](https://hyperstitionstud.io/)
|
> - **Repository Role & Public Route:** Shared PEP 420 Python core library (`hyperstitionstud_io.*`), MCP/REST server, `/quant/`, `/learn/`, `/engineering/`, `/math/`, & `/donate/` webroots → [`https://hyperstitionstud.io/`](https://hyperstitionstud.io/)
|
||||||
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 1 tracked module/artifact surface(s)
|
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 1 tracked module/artifact surface(s)
|
||||||
> - **Touched Files / Surfaces:** `tests/test_core_suite.py`
|
> - **Touched Files / Surfaces:** `src/hyperstitionstud_io/publishing/readme_sync.py`
|
||||||
> - **Live Verified Ecosystem Metrics (`v2.17.1`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data
|
> - **Live Verified Ecosystem Metrics (`v2.17.1`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data
|
||||||
<!-- HS-COMMIT-STATUS:END -->
|
<!-- HS-COMMIT-STATUS:END -->
|
||||||
|
|
||||||
|
|||||||
@@ -502,19 +502,26 @@ REPO_NAME="$(basename "${REPO_ROOT}")"
|
|||||||
WS_ROOT="$(cd "${REPO_ROOT}/.." && pwd)"
|
WS_ROOT="$(cd "${REPO_ROOT}/.." && pwd)"
|
||||||
CORE_SRC="${WS_ROOT}/hyperstitionstudio-core/src"
|
CORE_SRC="${WS_ROOT}/hyperstitionstudio-core/src"
|
||||||
|
|
||||||
|
PYTHON_BIN="python3"
|
||||||
|
if [[ -x "${WS_ROOT}/.venv/bin/python3" ]]; then
|
||||||
|
PYTHON_BIN="${WS_ROOT}/.venv/bin/python3"
|
||||||
|
elif [[ -x "${WS_ROOT}/hyperstitionstudio-core/.venv/bin/python3" ]]; then
|
||||||
|
PYTHON_BIN="${WS_ROOT}/hyperstitionstudio-core/.venv/bin/python3"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -d "${CORE_SRC}" ]]; then
|
if [[ -d "${CORE_SRC}" ]]; then
|
||||||
export PYTHONPATH="${CORE_SRC}${PYTHONPATH:+:${PYTHONPATH}}"
|
export PYTHONPATH="${CORE_SRC}${PYTHONPATH:+:${PYTHONPATH}}"
|
||||||
if [[ "${REPO_NAME}" == "hyperstitionstudio-core" ]]; then
|
if [[ "${REPO_NAME}" == "hyperstitionstudio-core" ]]; then
|
||||||
python3 -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${WS_ROOT}" --stage
|
"${PYTHON_BIN}" -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${WS_ROOT}" --stage
|
||||||
else
|
else
|
||||||
python3 -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${WS_ROOT}"
|
"${PYTHON_BIN}" -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${WS_ROOT}"
|
||||||
fi
|
fi
|
||||||
python3 -m hyperstitionstud_io.publishing.closeups_sync
|
"${PYTHON_BIN}" -m hyperstitionstud_io.publishing.closeups_sync
|
||||||
if [[ -d "${WS_ROOT}/hyperstitionstudio-core/site/assets/closeups" ]] && [[ "${REPO_NAME}" == "hyperstitionstudio-core" ]]; then
|
if [[ -d "${WS_ROOT}/hyperstitionstudio-core/site/assets/closeups" ]] && [[ "${REPO_NAME}" == "hyperstitionstudio-core" ]]; then
|
||||||
git -C "${REPO_ROOT}" add site/assets/closeups/
|
git -C "${REPO_ROOT}" add site/assets/closeups/
|
||||||
fi
|
fi
|
||||||
python3 -m hyperstitionstud_io.publishing.readme_sync --repo "${REPO_NAME}" --stage
|
"${PYTHON_BIN}" -m hyperstitionstud_io.publishing.readme_sync --repo "${REPO_NAME}" --stage
|
||||||
python3 -m hyperstitionstud_io.ci.shorthand_lint --staged-diff --repo "${REPO_ROOT}"
|
"${PYTHON_BIN}" -m hyperstitionstud_io.ci.shorthand_lint --staged-diff --repo "${REPO_ROOT}"
|
||||||
fi
|
fi
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user