- Launcher guards Python 3.13 before importing the package and chdirs to the repo root so cwd-relative default paths resolve consistently. - main() logs the resolved .env path and warns on a missing static dir or a short auth token; env_file reads utf-8-sig so a BOM doesn't drop the first variable. - .gitignore covers .claude/settings.local.json and .impeccable/.
27 lines
797 B
Python
27 lines
797 B
Python
from pathlib import Path
|
|
import os
|
|
import sys
|
|
|
|
# Guard BEFORE importing rights_filter so a 3.13-only syntax in the package
|
|
# surfaces this friendly message instead of a raw SyntaxError/ImportError.
|
|
if sys.version_info < (3, 13):
|
|
sys.exit(
|
|
"Copyrighter requires Python 3.13+ — activate the offline venv "
|
|
"(see docs/operations/offline-install.md)."
|
|
)
|
|
|
|
ROOT = Path(__file__).resolve().parent
|
|
SRC = ROOT / "src"
|
|
|
|
if str(SRC) not in sys.path:
|
|
sys.path.insert(0, str(SRC))
|
|
|
|
from rights_filter.server.__main__ import main
|
|
|
|
|
|
if __name__ == "__main__":
|
|
# Anchor the working directory to the repo root so the cwd-relative default
|
|
# paths (data/, web/operator-gui) resolve the same regardless of where the
|
|
# launcher was invoked from.
|
|
os.chdir(ROOT)
|
|
main()
|