diff --git a/README.md b/README.md index 14b7db0..78dd092 100644 --- a/README.md +++ b/README.md @@ -352,7 +352,7 @@ Exit codes: Downloaded zips are verified with SHA-256 when a checksum is available. Checksums are resolved in this order: 1. `LTP_DOWNLOAD_SHA256_`, where non-alphanumeric characters in the version are replaced with `_` and the name is uppercased. 2. `LTP_DOWNLOAD_SHA256`. -3. The bundled `language_tool_python/integrity.toml` manifest. +3. The bundled `language_tool_python/_ressources/integrity.toml` manifest. The bundled manifest covers release/archive downloads. Snapshots are not stable, so provide `LTP_DOWNLOAD_SHA256_` or `LTP_DOWNLOAD_SHA256` if you want to verify a snapshot. If no checksum is available, the download proceeds without SHA-256 verification. diff --git a/language_tool_python/__main__.py b/language_tool_python/__main__.py index 554dbb9..14b8015 100644 --- a/language_tool_python/__main__.py +++ b/language_tool_python/__main__.py @@ -66,7 +66,9 @@ def _read_project_version(pyproject: Path) -> str: logger = logging.getLogger(__name__) with importlib.resources.as_file( - importlib.resources.files("language_tool_python").joinpath("logging.toml"), + importlib.resources.files("language_tool_python") + .joinpath("_ressources") + .joinpath("logging.toml"), ) as config_path: log_config = _load_pyproject_and_logconfig(config_path) dictConfig(log_config) diff --git a/language_tool_python/integrity.toml b/language_tool_python/_ressources/integrity.toml similarity index 100% rename from language_tool_python/integrity.toml rename to language_tool_python/_ressources/integrity.toml diff --git a/language_tool_python/logging.toml b/language_tool_python/_ressources/logging.toml similarity index 100% rename from language_tool_python/logging.toml rename to language_tool_python/_ressources/logging.toml diff --git a/language_tool_python/download_lt.py b/language_tool_python/download_lt.py index d487392..b0f1320 100755 --- a/language_tool_python/download_lt.py +++ b/language_tool_python/download_lt.py @@ -120,7 +120,9 @@ def _load_expected_download_sha256(raw_manifest: str) -> dict[str, str]: with ( importlib.resources.as_file( - importlib.resources.files("language_tool_python").joinpath("integrity.toml"), + importlib.resources.files("language_tool_python") + .joinpath("_ressources") + .joinpath("integrity.toml"), ) as hashes_path, hashes_path.open("rb") as f, ):