Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,17 @@
siblings, a callback the host awaits - the copy in the memory store's sweep, and one false positive on
`dataclasses.replace`. **Upgrade note:** none.

12. **The license file at the project root is named `LICENSE`, as in the other repositories of the Mercury family.**
It was `LICENSE.txt`. `pyproject.toml` names the file in `license-files` and in the source distribution's list,
and the README links to it. Its copyright line names Accenture Technology, the holder that `authors` already
names. The build does not fail when one of the manifest's entries names a file that does not exist: with the
file renamed and the manifest unchanged, it built both distributions without the license text and without a
`License-File` line in their metadata. `tests/test_packaging.py` (two tests) fails in that case: every
`license-files` pattern matches a file, and every entry of the source distribution's list exists.
**Upgrade note:** the source distribution carries `LICENSE` at its root and the wheel
`dist-info/licenses/LICENSE`, where each carried `LICENSE.txt`; a script that reads the license by its file name
reads the new name.

### Documentation

1. **The documentation site gains the REST Automation guide, and the references follow.** `docs/guides/rest-automation.md`
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,4 +361,4 @@ PyCharm: use interpreter type **uv** pointing at the project `.venv`, and set

## License

Apache 2.0 — see [LICENSE.txt](LICENSE.txt).
Apache 2.0 — see [LICENSE](LICENSE).
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "4.12.30"
description = "Lightweight Event-over-HTTP function host and client for Mercury Composable"
readme = "README.md"
license = "Apache-2.0"
license-files = ["LICENSE.txt"]
license-files = ["LICENSE"]
authors = [{ name = "Accenture Technology" }]
requires-python = ">=3.11"
dependencies = [
Expand Down Expand Up @@ -92,7 +92,7 @@ only-include = [
"extensions",
"README.md",
"CHANGELOG.md",
"LICENSE.txt",
"LICENSE",
]

[tool.ruff]
Expand Down
30 changes: 30 additions & 0 deletions tests/test_packaging.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""The package manifest names files that exist.

The build does not fail when a ``license-files`` pattern or an entry of the source
distribution's list matches no file: it publishes the distributions without that file. A
renamed license file then leaves the package with no license text, and nothing says so.
These tests fail in that case.
"""

import tomllib
from pathlib import Path
from typing import Any

ROOT = Path(__file__).resolve().parent.parent


def _manifest() -> dict[str, Any]:
return tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))


def test_every_license_file_pattern_matches_a_file() -> None:
patterns: list[str] = _manifest()["project"]["license-files"]
assert patterns, "pyproject.toml names no license file"
unmatched = [pattern for pattern in patterns if not any(ROOT.glob(pattern))]
assert unmatched == [], f"license-files patterns that match no file: {unmatched}"


def test_every_entry_of_the_source_distribution_exists() -> None:
entries: list[str] = _manifest()["tool"]["hatch"]["build"]["targets"]["sdist"]["only-include"]
absent = [entry for entry in entries if not (ROOT / entry).exists()]
assert absent == [], f"entries of the source distribution that do not exist: {absent}"
Loading