df
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
This commit is contained in:
@@ -316,6 +316,15 @@ PY
|
||||
|
||||
if "$VENV_PY" -c 'import importlib; importlib.import_module("CLI")' >/dev/null 2>&1; then
|
||||
echo "OK: top-level 'CLI' is now importable (after .pth)." >&2
|
||||
|
||||
# Also verify we can run the packaged entrypoint using module form. If this fails
|
||||
# it suggests site-packages/.pth wasn't processed reliably by the interpreter.
|
||||
if "$VENV_PY" -m medeia_macina.cli_entry --help >/dev/null 2>&1; then
|
||||
echo "OK: 'python -m medeia_macina.cli_entry' runs in the venv." >&2
|
||||
else
|
||||
echo "ERROR: 'python -m medeia_macina.cli_entry' failed in the venv despite .pth being written; aborting." >&2
|
||||
exit 6
|
||||
fi
|
||||
else
|
||||
echo "ERROR: top-level 'CLI' still not importable after writing .pth ($pth_file)." >&2
|
||||
exit 6
|
||||
@@ -528,12 +537,7 @@ PY
|
||||
echo "MM_DEBUG: end diagnostics" >&2
|
||||
fi
|
||||
|
||||
# Packaged console script in the venv if available
|
||||
if [ -x "$VENV/bin/mm" ]; then
|
||||
exec "$VENV/bin/mm" "$@"
|
||||
fi
|
||||
|
||||
# Prefer venv's python3, then venv's python
|
||||
# Prefer venv's python3, then venv's python (module invocation - more deterministic)
|
||||
if [ -x "$VENV/bin/python3" ]; then
|
||||
exec "$VENV/bin/python3" -m medeia_macina.cli_entry "$@"
|
||||
fi
|
||||
@@ -541,6 +545,11 @@ if [ -x "$VENV/bin/python" ]; then
|
||||
exec "$VENV/bin/python" -m medeia_macina.cli_entry "$@"
|
||||
fi
|
||||
|
||||
# Fallback: packaged console script in the venv (older pip-generated wrapper)
|
||||
if [ -x "$VENV/bin/mm" ]; then
|
||||
exec "$VENV/bin/mm" "$@"
|
||||
fi
|
||||
|
||||
# Fallback to system python3, then system python (only if it's Python 3)
|
||||
if command -v python3 >/dev/null 2>&1; then
|
||||
exec python3 -m medeia_macina.cli_entry "$@"
|
||||
|
||||
Reference in New Issue
Block a user