Find the ccc executable in PATH or the same directory as python.
()
| 449 | |
| 450 | |
| 451 | def _find_ccc_executable() -> str | None: |
| 452 | """Find the ccc executable in PATH or the same directory as python.""" |
| 453 | python_dir = Path(sys.executable).parent |
| 454 | names = ["ccc.exe", "ccc"] if sys.platform == "win32" else ["ccc"] |
| 455 | for name in names: |
| 456 | ccc = python_dir / name |
| 457 | if ccc.exists(): |
| 458 | return str(ccc) |
| 459 | return None |
| 460 | |
| 461 | |
| 462 | def _pid_alive(pid: int) -> bool: |