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:
@@ -304,11 +304,10 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO="$SCRIPT_DIR"
|
||||
VENV="$REPO/.venv"
|
||||
PY="$VENV/bin/python"
|
||||
CLI_SCRIPT="$REPO/CLI.py"
|
||||
if [ -x "$PY" ]; then
|
||||
exec "$PY" "$CLI_SCRIPT" "$@"
|
||||
exec "$PY" -m medeia_macina.cli_entry "$@"
|
||||
else
|
||||
exec python "$CLI_SCRIPT" "$@"
|
||||
exec python -m medeia_macina.cli_entry "$@"
|
||||
fi
|
||||
"""
|
||||
try:
|
||||
@@ -323,10 +322,10 @@ $repo = $scriptDir
|
||||
$venv = Join-Path $repo '.venv'
|
||||
$py = Join-Path $venv 'Scripts\python.exe'
|
||||
$cli = Join-Path $repo 'CLI.py'
|
||||
if (Test-Path $py) { & $py $cli @args; exit $LASTEXITCODE }
|
||||
if (Test-Path $cli) { & $py $cli @args; exit $LASTEXITCODE }
|
||||
if (Test-Path $py) { & $py -m medeia_macina.cli_entry @args; exit $LASTEXITCODE }
|
||||
if (Test-Path $cli) { & python $cli @args; exit $LASTEXITCODE }
|
||||
# fallback
|
||||
python $cli @args
|
||||
python -m medeia_macina.cli_entry @args
|
||||
"""
|
||||
try:
|
||||
ps1.write_text(ps1_text, encoding="utf-8")
|
||||
@@ -336,9 +335,10 @@ python $cli @args
|
||||
bat_text = (
|
||||
"@echo off\r\n"
|
||||
"set SCRIPT_DIR=%~dp0\r\n"
|
||||
"if exist \"%SCRIPT_DIR%\\.venv\\Scripts\\python.exe\" \"%SCRIPT_DIR%\\.venv\\Scripts\\python.exe\" \"%SCRIPT_DIR%\\CLI.py\" %*\r\n"
|
||||
"if exist \"%SCRIPT_DIR%\\.venv\\Scripts\\python.exe\" \"%SCRIPT_DIR%\\.venv\\Scripts\\python.exe\" -m medeia_macina.cli_entry %*\r\n"
|
||||
"if exist \"%SCRIPT_DIR%\\CLI.py\" python \"%SCRIPT_DIR%\\CLI.py\" %*\r\n"
|
||||
"python -m medeia_macina.cli_entry %*\r\n"
|
||||
"python -m medeia_macina.cli_entry %*\r\n"
|
||||
)
|
||||
try:
|
||||
bat.write_text(bat_text, encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user