plesty license#
Maintain and verify REUSE licensing for a project.
Python sources carry inline SPDX headers — a collective SPDX-FileCopyrightText
holder (the first [project].authors entry) plus one SPDX-FileContributor line
per individual author. Non-code files (docs, assets, the root LICENSE, lockfiles)
are covered centrally by REUSE.toml.
update#
plesty license update
Reads the copyright holder and contributors from [project].authors and the SPDX
license identifier from [project].license, downloads the license text into
LICENSES/ if it is missing, then runs reuse annotate --skip-existing over the
project’s Python files. Only files without a header are annotated; curated
headers (for example multi-author files) are left untouched.
Prerequisites#
The pyproject.toml must declare [project].license as an SPDX identifier and at
least one [project].authors entry:
# pyproject.toml
[project]
license = "LGPL-3.0-or-later"
authors = [
{ name = "Plesty Development Team" }, # collective copyright holder
{ name = "Jane Doe" }, # contributor
]
The first author is used as the collective SPDX-FileCopyrightText; the rest
become SPDX-FileContributor entries.
lint#
plesty license lint
Runs reuse lint and reports whether the project is compliant with the REUSE
specification.
Example#
# from another directory
plesty --project-dir ../my-device license update