Some checks failed
Make distro packages the single source of truth for GTK/X11 Python bindings instead of advertising them as wheel-managed runtime dependencies. Update the uv, CI, and packaging workflows to use system site packages, regenerate uv.lock, and keep portable and Arch metadata aligned with that contract. Pull runtime policy, audio probing, and page builders out of config_ui.py so the settings window becomes a coordinator instead of a single large mixed-concern module. Rename the config serialization and logging helpers, and stop startup logging from exposing raw vocabulary entries or custom model paths. Remove stale helper aliases and add regression coverage for safe startup logging, packaging metadata and module drift, portable requirements, and the extracted audio helper behavior. Validated with uv lock, python3 -m compileall -q src tests, python3 -m unittest discover -s tests -p 'test_*.py', make build, and make package-arch.
47 lines
1.6 KiB
Text
47 lines
1.6 KiB
Text
# Maintainer: Thales Maciel <thales@thalesmaciel.com>
|
|
pkgname=aman
|
|
pkgver=__VERSION__
|
|
pkgrel=1
|
|
pkgdesc="Local amanuensis daemon for X11 desktops"
|
|
arch=('x86_64')
|
|
url="https://git.thaloco.com/thaloco/aman"
|
|
license=('MIT')
|
|
depends=('python' 'python-pip' 'python-setuptools' 'portaudio' 'gtk3' 'libayatana-appindicator' 'python-gobject' 'python-xlib')
|
|
makedepends=('python-build' 'python-installer' 'python-wheel')
|
|
source=("__TARBALL_NAME__")
|
|
sha256sums=('__TARBALL_SHA256__')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/aman-${pkgver}"
|
|
python -m build --wheel
|
|
python - <<'PY'
|
|
import ast
|
|
from pathlib import Path
|
|
import re
|
|
|
|
text = Path("pyproject.toml").read_text(encoding="utf-8")
|
|
match = re.search(r"(?ms)^\s*dependencies\s*=\s*\[(.*?)^\s*\]", text)
|
|
if not match:
|
|
raise SystemExit("project dependencies not found in pyproject.toml")
|
|
dependencies = ast.literal_eval("[" + match.group(1) + "]")
|
|
filtered = [dependency.strip() for dependency in dependencies]
|
|
Path("dist/runtime-requirements.txt").write_text("\n".join(filtered) + "\n", encoding="utf-8")
|
|
PY
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/aman-${pkgver}"
|
|
install -dm755 "${pkgdir}/opt/aman"
|
|
python -m venv --system-site-packages "${pkgdir}/opt/aman/venv"
|
|
"${pkgdir}/opt/aman/venv/bin/python" -m pip install --upgrade pip
|
|
"${pkgdir}/opt/aman/venv/bin/python" -m pip install --requirement "dist/runtime-requirements.txt"
|
|
"${pkgdir}/opt/aman/venv/bin/python" -m pip install --no-deps "dist/aman-${pkgver}-"*.whl
|
|
|
|
install -Dm755 /dev/stdin "${pkgdir}/usr/bin/aman" <<'EOF'
|
|
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
exec /opt/aman/venv/bin/aman "$@"
|
|
EOF
|
|
|
|
install -Dm644 "systemd/aman.service" "${pkgdir}/usr/lib/systemd/user/aman.service"
|
|
}
|