mirror of
https://github.com/n0mjs710/HBlink4.git
synced 2026-11-08 04:19:26 +00:00
The previous commit required "pip install -e ." before anything would run, and made "python hblink4/hblink.py" fail outright. That trades a real support burden -- an install step people forget after git pull, and an error message that looks like a broken checkout -- for an internal correctness property. Not a good trade for this project's users, who have run hblink by interpreter-plus-path since HBlink3 and DMRlink. Establish the package context explicitly instead. When hblink4/hblink.py or dashboard/server.py is run by path, __package__ is empty, so each now puts the project root on sys.path and sets __package__ before its relative imports. That is enough for "from .constants import ..." to resolve to hblink4.constants -- one copy, not the two the old except-ImportError fallback produced. Importing the parent package is cheap because __init__.py is metadata only. Every invocation style now works and none of them double-load: python hblink4/hblink.py config/config.json <- systemd uses this python dashboard/server.py <- systemd uses this python run_hblink.py config/config.json <- convenience python run_dashboard.py <- convenience python -m hblink4.hblink hblink4 <- if pip installed The systemd units invoke the module files directly rather than going through a launcher, so there is one less moving part between systemd and the program. run_hblink.py and run_dashboard.py stay in the project root as launchers for interactive use, but they are now genuinely logic-free: the uvicorn call that used to live in run_dashboard.py is dashboard.server.run(). requirements.txt and requirements-dashboard.txt come back as the documented install path. pyproject.toml stays for those who want "pip install -e .", but is now optional and reads its dependencies from those files so the two cannot drift. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
7 lines
356 B
Plaintext
7 lines
356 B
Plaintext
# asyncio is part of Python 3.7+ standard library (no external dependency needed)
|
|
# Removed: twisted>=22.10.0, pyOpenSSL>=23.2.0, service_identity>=23.1.0
|
|
typing-extensions>=4.7.1 # For Python <3.9 compatibility
|
|
pytest>=7.4.0 # For running tests
|
|
pytest-cov>=4.1.0 # For test coverage reports
|
|
dmr_utils3>=0.1.29 # For DMR FEC decoding and LC extraction
|