()
| 10 | |
| 11 | # Script execution environment |
| 12 | def 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 | |
| 29 | def install_pip_packages(*packages: str): |
no outgoing calls
no test coverage detected