Decouple non-UI CLI startup from config_ui
Stop aman.py from importing the GTK settings module at module load so version, init, bench, diagnostics, and top-level help can start without pulling in the UI stack.\n\nPromote PyGObject and python-xlib into main project dependencies, switch the documented source install surface to plain uv/pip commands, and teach the portable, deb, and Arch packaging flows to install filtered runtime requirements before the Aman wheel so they still rely on distro-provided GTK/X11 packages.\n\nAdd regression coverage for importing aman with config_ui blocked and for the portable bundle's new requirements payload, then rerun the focused CLI/diagnostics/portable tests plus py_compile.
This commit is contained in:
parent
b4a3d446fa
commit
721248ca26
15 changed files with 173 additions and 35 deletions
|
|
@ -84,3 +84,30 @@ render_template() {
|
|||
sed -i "s|__${key}__|${value}|g" "${output_path}"
|
||||
done
|
||||
}
|
||||
|
||||
write_runtime_requirements() {
|
||||
local output_path="$1"
|
||||
require_command python3
|
||||
python3 - "${output_path}" <<'PY'
|
||||
from pathlib import Path
|
||||
import re
|
||||
import sys
|
||||
import tomllib
|
||||
|
||||
output_path = Path(sys.argv[1])
|
||||
exclude = {"pygobject", "python-xlib"}
|
||||
project = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8"))
|
||||
dependencies = project.get("project", {}).get("dependencies", [])
|
||||
filtered = []
|
||||
for dependency in dependencies:
|
||||
match = re.match(r"\s*([A-Za-z0-9_.-]+)", dependency)
|
||||
if not match:
|
||||
continue
|
||||
name = match.group(1).lower().replace("_", "-")
|
||||
if name in exclude:
|
||||
continue
|
||||
filtered.append(dependency.strip())
|
||||
output_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
output_path.write_text("\n".join(filtered) + "\n", encoding="utf-8")
|
||||
PY
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue