1) set the required textual version to version 8.2.8
2) generated installers which bundle the required .venv
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
Sets up the bundled i18n library (see ``lib/i18n``) with the application's
|
||||
own translation data (in ``i18n/<lang>/strings.json``) before starting the
|
||||
Textual application.
|
||||
|
||||
Works unmodified from a plain source checkout, from a PyInstaller build, or
|
||||
from a pex zipapp — see ``app/runtime_paths.py`` for how the base directory
|
||||
is resolved in each case.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -11,11 +15,18 @@ from __future__ import annotations
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parent
|
||||
# main.py's own directory is already on sys.path (Python does this for the
|
||||
# script it runs), so the local `app` package is importable immediately.
|
||||
from app.runtime_paths import bundle_root
|
||||
|
||||
PROJECT_ROOT = bundle_root()
|
||||
|
||||
# The i18n library package lives in lib/, kept separate from the i18n/
|
||||
# *data* directory (project_root/i18n/<lang>/strings.json) that the library
|
||||
# itself expects to find at the project root.
|
||||
# itself expects to find at the project root. In a PyInstaller build this
|
||||
# path doesn't exist on disk (the library's code is embedded directly in
|
||||
# the bundle and importable regardless), so inserting it is a harmless
|
||||
# no-op there.
|
||||
sys.path.insert(0, str(PROJECT_ROOT / "lib"))
|
||||
|
||||
from i18n import I18n # noqa: E402 (import must follow sys.path setup)
|
||||
|
||||
Reference in New Issue
Block a user