public/manifest-license/python
Package manifest declares the license
Implements public/manifest-license for python.
| Severity | info |
| Tiers | 1 |
| Stacks | python |
| Scope | each |
| Kind | expr |
| Source | library v0.8.0 |
| Selected by | fleetlint-recommended@v0.8.0 |
Requirement
pyproject.toml sets project.license (SPDX, PEP 639), license-files or a license classifier, unless it carries the Private :: Do Not Upload classifier.
Why
Registries, SBOM tools and license checkers read the manifest, not the LICENSE file.
Capability applies when
repo.publicCheck
!file("pyproject.toml") || scan("pyproject.toml", r'Private :: Do Not Upload').size() > 0 || scan("pyproject.toml", r'^\s*license(-files)?\s*=|License ::').size() > 0Fix
Set license = "<SPDX id>" in pyproject.toml’s [project] table.
Agent instruction (from public/manifest-license): Set the manifest’s license field to the SPDX identifier matching the LICENSE file; ask if the LICENSE text is not a recognised license.
A finding that names no file points at pyproject.toml.
Sources
- https://spdx.org/licenses/ (spec)
- https://fleetlint.org/baseline/#public-repositories (convention)
- https://peps.python.org/pep-0639/ (spec)
- https://fleetlint.org/stacks/#python
Generated by fleetlint docs from catalog v0.8.0.