Skip to content

Commit 33a7a39

Browse files
committed
Clarify SPDX WITH version requirement and error message
1 parent 66499fb commit 33a7a39

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎doc/pyproject_toml.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Version constraints:
3030
- For now, all packages should specify ``<5``, so they won't be impacted by
3131
changes in the next major version.
3232
- ``import-names`` and ``import-namespaces`` require ``flit_core >=4``.
33+
- License expressions using ``WITH`` require ``flit_core >=4.1``.
3334
- ``license-files`` and license expressions in the ``license`` field require
3435
``flit_core >=3.11``.
3536
- :ref:`pyproject_toml_project` requires ``flit_core >=3.2``.

‎flit_core/flit_core/config.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ def normalise_compound_license_expr(s: str) -> str:
747747
parts.append(part)
748748
else:
749749
if parts and parts[-1] not in {' AND ', ' OR ', ' WITH ', '('}:
750-
reason = "a license ID must follow either AND, OR, or '('"
750+
reason = "a license or exception ID must follow AND, OR, WITH, or '('"
751751
raise ConfigError(invalid_msg.format(s=s, reason=reason))
752752
if parts and parts[-1] == ' WITH ':
753753
simple_expr = normalise_license_exception(part)

0 commit comments

Comments
 (0)