INNER CODE UNIT · Python
_run_java
pegasus-isi/pegasus · packages/pegasus-python/src/Pegasus/cli/main.py:35
def _run_java(main_class: str, args) -> None:
from Pegasus.cli._java import get_system_properties, run_java_tool
run_java_tool(main_class, args=args, system_properties=get_system_properties())
def _exec_binary(binary_name: str, args) -> None:
"""Exec a compiled (non-Python) CLI tool installed alongside this
interpreter — e.g. pegasus-transfer, which CMake installs directly into
<venv>/bin/ rather than exposing as a console_scripts wrapper (see
top-level CMakeLists.txt / packages/pegasus-transfer/CMakeLists.txt).
"""
candidate = Path(sys.executable).parent / binary_name
path = str(candidate) if candidate.exists() else shutil.which(binary_name)
if not path:
click.echo(f"pegasus: {binary_name}: executable not found", err=True)
sys.exit(1)
os.execv(path, [path] + list(args))