Skip to content

chore(license): add SPDX identifiers to all source files - #173

Merged
justinjoy merged 2 commits into
mainfrom
chore/spdx-headers
Jun 19, 2026
Merged

chore(license): add SPDX identifiers to all source files#173
justinjoy merged 2 commits into
mainfrom
chore/spdx-headers

Conversation

@justinjoy

Copy link
Copy Markdown
Contributor

What

Adds # SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later to every Python source file (104 files under src/, tests/, examples/, scripts/, and setup.py), inserted after the shebang where one exists.

Why

PyreWire is dual-licensed and declares license = "Apache-2.0 OR GPL-3.0-or-later" in pyproject.toml, but no source file carried a per-file SPDX tag (audit: 0 of 104). Per-file tags are what make the license machine-discoverable for REUSE/SPDX tooling and downstream redistribution.

Enforcement

Adds tests/test_spdx_headers.py — a contract test (mirroring this repo's existing workflow/version contract tests) that fails the build if any source file is missing the tag or declares a different expression, so headers cannot silently drift as new files are added.

No functional/code changes; comments only + one new test. Module docstrings remain the first statement and are unaffected.

PyreWire is dual-licensed (Apache-2.0 OR GPL-3.0-or-later) and declares
this at the package level in pyproject.toml, but no source file carried a
per-file SPDX tag. Add

    # SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later

to every .py file under src/, tests/, examples/, scripts/ and setup.py
(after the shebang where present), making the license machine-discoverable
for REUSE/SPDX tooling and downstream redistribution.

Add tests/test_spdx_headers.py as a contract test that fails the build if
any source file is missing the tag or declares a different expression, so
the headers cannot silently drift.
@justinjoy
justinjoy merged commit 44eed77 into main Jun 19, 2026
17 checks passed
@justinjoy
justinjoy deleted the chore/spdx-headers branch June 19, 2026 12:20
@justinjoy justinjoy mentioned this pull request Jun 19, 2026
justinjoy added a commit that referenced this pull request Jun 19, 2026
PyreWire-only maintenance release. Bumps the project and runtime version
to 1.0.2 and records the release in CHANGELOG.md and docs/versioning.md.

Changes since 1.0.1 are CI/tooling and metadata only:
- actions/checkout v6->v7 and pypa/cibuildwheel v4.0.0->v4.1.0 (#171, #172)
- SPDX license headers on all source files + enforcement test (#173)
- expanded Errors reference documentation

The public API is unchanged and the bundled/validated wirelog ref remains
v0.51.0 (0c6e0cdaee7db069be5d8d896bb59bdcb15673e9); the runtime wirelog
floor remains 0.44.0.

Update the version-pinning contract tests (release metadata, changelog
compare links) to track 1.0.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant