src/voxip_kiosk -> src/daynivo_kiosk, with every import, the launchers, install.sh, the Makefile and the manager's gunicorn app path. An upgrade replaces /usr/lib/voxip-kiosk/python as a whole, so the old package disappears; tested by upgrading an installation of the previous commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.8 KiB
Makefile
41 lines
1.8 KiB
Makefile
PY ?= .venv/bin/python
|
|
DEV := $(CURDIR)/.dev
|
|
DEV_ENV := PYTHONPATH=src VOXIP_CONFIG_DIR=$(DEV)/etc VOXIP_STATE_DIR=$(DEV)/state VOXIP_LOG_DIR=$(DEV)/log \
|
|
VOXIP_SHARE_DIR=$(DEV)/share VOXIP_AGENT_RUN_DIR=$(DEV)/run VOXIP_BROWSER_RUN_DIR=$(DEV)/run \
|
|
VOXIP_NETWORK_STATE_DIR=$(DEV)/net VOXIP_HELPER=/nonexistent/voxip-kiosk-helper
|
|
|
|
.PHONY: venv test lint test-bookworm dev image clean
|
|
|
|
venv:
|
|
python3 -m venv .venv && .venv/bin/pip install -q -r requirements-dev.txt
|
|
|
|
test:
|
|
$(PY) -m pytest
|
|
|
|
lint:
|
|
shellcheck -S warning install.sh update.sh uninstall.sh image/build.sh image/stage-voxip/prerun.sh \
|
|
image/stage-voxip/00-voxip/00-run.sh bin/voxip-kiosk-x
|
|
|
|
# The test suite against the exact Python/Flask/argon2 versions that Raspberry Pi OS Bookworm ships.
|
|
test-bookworm:
|
|
docker run --rm -v "$(CURDIR)":/src:ro debian:bookworm bash -c '\
|
|
apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
|
|
python3 python3-flask python3-argon2 python3-websocket python3-pytest shellcheck >/dev/null && \
|
|
cp -r /src /work && cd /work && rm -rf .venv && python3 -m pytest -p no:cacheprovider && \
|
|
shellcheck -S warning install.sh install-online.sh update.sh uninstall.sh tools/release-upload.sh image/build.sh bin/voxip-kiosk-x'
|
|
|
|
# Web interface on http://127.0.0.1:8080 with throwaway state in .dev/ (system actions fail gracefully).
|
|
dev:
|
|
mkdir -p $(DEV)/etc $(DEV)/state $(DEV)/log $(DEV)/run $(DEV)/net $(DEV)/share
|
|
test -f $(DEV)/etc/config.json || cp config/config.default.json $(DEV)/etc/config.json
|
|
cp VERSION $(DEV)/share/VERSION
|
|
@echo "Setupcode: zie $(DEV)/etc/setup-code (wordt aangemaakt bij de start)"
|
|
$(DEV_ENV) $(PY) -m flask --app 'daynivo_kiosk.web:create_app()' run --host 127.0.0.1 --port 8080
|
|
|
|
image:
|
|
./image/build.sh
|
|
|
|
clean:
|
|
rm -rf .dev .pytest_cache image/work
|
|
find . -name __pycache__ -type d -prune -exec rm -rf {} +
|