MCPcopy
hub / github.com/granawkins/rawdog / get_rawdog_python_executable

Function get_rawdog_python_executable

src/rawdog/execute_script.py:12–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11# Script execution environment
12def get_rawdog_python_executable():
13 venv_dir = rawdog_dir / "venv"
14 if platform.system() == "Windows":
15 python_executable = venv_dir / "Scripts" / "python"
16 else:
17 python_executable = venv_dir / "bin" / "python"
18 if not venv_dir.exists():
19 print(f"Creating virtual environment in {venv_dir}...")
20 subprocess.run(
21 [sys.executable, "-m", "venv", str(venv_dir)],
22 stdout=DEVNULL,
23 stderr=DEVNULL,
24 check=True,
25 )
26 return str(python_executable)
27
28
29def install_pip_packages(*packages: str):

Callers 2

install_pip_packagesFunction · 0.85
execute_scriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected