wads.install_system_deps¶
Install system dependencies from [tool.wads.ops.*] sections in pyproject.toml.
This script reads system dependency configurations and installs them on the appropriate platform. It can be used as a standalone CLI tool or imported as a module.
Each [tool.wads.ops.<dep>] section may declare an install_timeout (seconds)
to raise the per-command ceiling for a dependency that is slow but healthy — a
cold-cache apt-get install ffmpeg on a GitHub runner is the motivating case.
Without a declaration the timeout stays at DFLT_INSTALL_TIMEOUT:
[tool.wads.ops.ffmpeg]
install_timeout = 900
install.linux = ["sudo apt-get update", "sudo apt-get install -y ffmpeg"]
The CLI’s --install-timeout sets the fallback for dependencies that declare
none; a declaration always wins over it.
Functions
|
Check if dependency is already installed using check commands. |
Detect the current platform. |
|
|
Find pyproject.toml file from path (file or directory). |
|
Install a dependency using install commands. |
|
Install system dependencies from pyproject.toml. |
|
CLI entry point. |
|
Read [tool.wads.ops.*] sections from pyproject.toml. |
- wads.install_system_deps.check_if_installed(dep_name, check_cmds, timeout=10)[source]¶
Check if dependency is already installed using check commands.
- wads.install_system_deps.find_pyproject(path)[source]¶
Find pyproject.toml file from path (file or directory).
- Return type:
- wads.install_system_deps.install_dependency(dep_name, install_cmds, timeout=300)[source]¶
Install a dependency using install commands.
- wads.install_system_deps.install_system_dependencies(pyproject_path='.', platform=None, skip_check=False, verbose=True, *, default_install_timeout=300)[source]¶
Install system dependencies from pyproject.toml.
- Parameters:
pyproject_path (
str) – Path to pyproject.toml or directory containing itplatform (
Optional[str]) – Platform to install for (linux/macos/windows), auto-detect if Noneskip_check (
bool) – Skip checking if dependencies are already installedverbose (
bool) – Print detailed progressdefault_install_timeout (
float) – Per-command install timeout (seconds) for dependencies that declare noinstall_timeoutof their own.
- Return type:
- Returns:
(installed_count, skipped_count, failed_count)