diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..0f9e29b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @gaborbernat diff --git a/.github/FUNDING.yaml b/.github/FUNDING.yaml new file mode 100644 index 0000000..220f93d --- /dev/null +++ b/.github/FUNDING.yaml @@ -0,0 +1,2 @@ +github: gaborbernat +thanks_dev: u/gh/gaborbernat diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..5447e64 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,45 @@ +# Security policy + +hatch-pep770 is a hatchling build hook that writes a CycloneDX SBOM into wheels, plus a command line tool that renders +that SBOM as SPDX and validates it. This policy says how to report a security problem and how we decide whether a report +is one. + +## Reporting a vulnerability + +**Do not open a public issue for a security problem.** Use +[GitHub's private vulnerability reporting](https://github.com/tox-dev/hatch-pep770/security/advisories/new). If you do +not have a GitHub account, email [gaborjbernat@gmail.com](mailto:gaborjbernat@gmail.com). + +Include what the attacker controls and what they gain, the steps or a proof of concept, and the versions and platform +you tested. Write the report yourself; unreviewed tool or model output takes longer to triage. + +## What to expect + +Volunteers maintain hatch-pep770, with no on-call rotation. We aim to acknowledge a report within **5 working days** and +assess it within **15 working days**. Fixes are developed in a private fork attached to the draft advisory, ship in a +new release, and the advisory, with a CVE requested through GitHub, goes out with that release. The default embargo is +**90 days** from the report; we agree any change with the reporter. We credit reporters in the advisory under the name +they choose, or not at all. There is no bug bounty. + +## Supported versions + +Only the latest release receives fixes. Confirm the problem reproduces on it before reporting. + +## Vulnerability or bug + +The build hook runs inside a project's own build, with the trust that build already has: the project source, its +`pyproject.toml`, its build requirements and the build environment are trusted. A report that needs control of one of +those is a bug: we fix it in the open and publish no advisory. + +**In scope** + +- A wheel bundled as a data file, or an SBOM given to `hatch-pep770 spdx` or `validate`, that makes the tool write + outside its output file or the wheel's `.dist-info/sboms/` directory, or run code. +- An SBOM that misstates what the wheel contains in a way the project's own inputs cannot explain, such as a wrong hash. + +**Out of scope** + +- Anything hatchling's own build trusts. +- Vulnerabilities in the packages the SBOM lists; report those to their projects. + +If you cannot tell which side a finding falls on, report it privately and we will decide. diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..3c1c011 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,30 @@ +version: 2 +multi-ecosystem-groups: + dependencies: + schedule: + interval: weekly + day: tuesday + labels: + - dependencies + - skip news +updates: + - package-ecosystem: github-actions + directory: / + patterns: + - '*' + multi-ecosystem-group: dependencies + labels: + - dependencies + - skip news + cooldown: + default-days: 7 + - package-ecosystem: pre-commit + directory: / + patterns: + - '*' + multi-ecosystem-group: dependencies + labels: + - dependencies + - skip news + cooldown: + default-days: 7 diff --git a/.github/release.yaml b/.github/release.yaml new file mode 100644 index 0000000..5f89818 --- /dev/null +++ b/.github/release.yaml @@ -0,0 +1,5 @@ +changelog: + exclude: + authors: + - dependabot[bot] + - pre-commit-ci[bot] diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..55ebfc3 --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,63 @@ +name: ๐Ÿงช check +on: + workflow_dispatch: + push: + branches: ["main"] + tags-ignore: ["**"] + pull_request: + types: [opened, synchronize, reopened] + schedule: + - cron: "27 8 * * *" +concurrency: + group: check-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} +permissions: + contents: read +jobs: + test: + name: ๐Ÿงช Test + uses: tox-dev/github-workflows/.github/workflows/check.yaml@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 + permissions: + contents: read + with: + include: | + [ + {"env": "3.15"}, + {"env": "3.15t", "python": "3.15t"}, + {"env": "3.14", "python": "3.14"}, + {"env": "3.13", "python": "3.13"}, + {"env": "3.12", "python": "3.12"}, + {"env": "3.11", "python": "3.11"}, + {"env": "3.10", "python": "3.10"}, + {"env": "3.9", "python": "3.9"}, + {"env": "type"}, + {"env": "dev"}, + {"env": "pkg_meta"}, + {"env": "3.15", "os": "windows-2025-vs2026"}, + {"env": "3.14", "python": "3.14", "os": "windows-2025-vs2026"}, + {"env": "3.9", "python": "3.9", "os": "windows-2025-vs2026"}, + {"env": "3.15", "os": "macos-26"} + ] + release: + name: ๐Ÿท๏ธ Release dry run + uses: ./.github/workflows/prepare-release.yaml # zizmor: ignore[self-repository] actionlint rejects the $/ form + permissions: + contents: read + pull-requests: read + with: + dry-run: true + hooks: + name: ๐Ÿงน Hooks under the cooldown + uses: tox-dev/github-workflows/.github/workflows/cooled-hooks.yaml@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 + permissions: + contents: read + gate: + name: ๐Ÿšฆ ${{ github.event_name == 'pull_request' && 'Required checks pass' || 'Non-PR checks pass' }} + if: ${{ !cancelled() }} # codespell:ignore cancelled + needs: [test, release, hooks] + runs-on: ubuntu-26.04 + steps: + - name: ๐Ÿšฆ Require all needed jobs to pass + uses: tox-dev/github-workflows/required-checks@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 + with: + needs: ${{ toJSON(needs) }} diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml new file mode 100644 index 0000000..de17f24 --- /dev/null +++ b/.github/workflows/codeql.yaml @@ -0,0 +1,22 @@ +name: ๐Ÿ›ก๏ธ CodeQL +on: + workflow_dispatch: + push: + branches: ["main"] + pull_request: + schedule: + - cron: "35 8 * * 2" +concurrency: + group: codeql-${{ github.ref }} + cancel-in-progress: true +permissions: {} +jobs: + analyze: + name: ๐Ÿ›ก๏ธ Analyze + uses: tox-dev/github-workflows/.github/workflows/codeql.yaml@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 + permissions: + contents: read + security-events: write + with: + languages: '["actions","python"]' + paths-ignore: '["tests"]' diff --git a/.github/workflows/news.yaml b/.github/workflows/news.yaml new file mode 100644 index 0000000..c707bc0 --- /dev/null +++ b/.github/workflows/news.yaml @@ -0,0 +1,30 @@ +name: ๐Ÿ“ Changelog +on: + pull_request: + types: [opened, reopened, synchronize, labeled, unlabeled] +permissions: + contents: read + pull-requests: read +jobs: + changelog: + name: ๐Ÿ“ News fragment + runs-on: ubuntu-26.04 + steps: + - name: ๐Ÿ“ฅ Check out code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: false + - name: ๐Ÿ Install uv + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + with: + version: latest-known + python-version: "3.15" + enable-cache: false + - name: ๐Ÿ“ฆ Install locked release tools + uses: tox-dev/github-workflows/install-locked-tools@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 + with: + groups: release-news + venv: ${{ runner.temp }}/release-tools + - name: ๐Ÿ” Validate news fragments + uses: tox-dev/github-workflows/validate-news@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml new file mode 100644 index 0000000..3daaefb --- /dev/null +++ b/.github/workflows/prepare-release.yaml @@ -0,0 +1,33 @@ +name: ๐Ÿท๏ธ Prepare release +on: + workflow_dispatch: + inputs: + bump: + description: Version bump strategy + required: true + type: choice + options: + - auto + - major + - minor + - patch + default: auto + workflow_call: + inputs: + dry-run: + description: Assemble the release without pushing, for the pull request gate + type: boolean + required: true +permissions: {} +jobs: + prepare: + name: ๐Ÿท๏ธ Prepare Towncrier release + uses: tox-dev/github-workflows/.github/workflows/prepare-towncrier-release.yaml@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 + permissions: + contents: read + pull-requests: read + secrets: + RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} + with: + bump: ${{ inputs.bump || 'auto' }} + dry-run: ${{ inputs.dry-run == true }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..df5858b --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,56 @@ +name: ๐Ÿš€ Release to PyPI +on: + push: + tags: ["*"] +permissions: + contents: read +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: false +jobs: + build: + name: ๐Ÿ—๏ธ Build + uses: tox-dev/github-workflows/.github/workflows/validate-python-release.yaml@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 + permissions: + contents: read + notes: + name: ๐Ÿ“ Render GitHub Release notes + uses: tox-dev/github-workflows/.github/workflows/release-notes.yaml@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 + permissions: + contents: read + with: + tag: ${{ github.ref_name }} + changelog: CHANGELOG.md + artifact-url: https://pypi.org/project/hatch-pep770/${{ github.ref_name }}/ + publish-pypi: + name: ๐Ÿš€ Publish to PyPI + needs: [build, notes] + runs-on: ubuntu-26.04 + environment: + name: release + url: https://pypi.org/project/hatch-pep770/${{ github.ref_name }} + permissions: + id-token: write + steps: + - name: ๐Ÿ“ฉ Download distributions + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + artifact-ids: ${{ needs.build.outputs.distributions-artifact-id }} + path: dist + - name: ๐Ÿš€ Publish to PyPI + uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3 + with: + attestations: true + packages-dir: dist + github-release: + name: ๐Ÿš€ Publish GitHub Release + needs: [build, notes, publish-pypi] + uses: tox-dev/github-workflows/.github/workflows/github-release.yaml@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 + permissions: + contents: write + with: + project: hatch-pep770 + version: ${{ github.ref_name }} + tag: ${{ github.ref_name }} + artifact-pattern: python-package-distributions + notes-artifact-id: ${{ needs.notes.outputs.artifact-id }} diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml new file mode 100644 index 0000000..a219ba2 --- /dev/null +++ b/.github/workflows/scorecard.yaml @@ -0,0 +1,26 @@ +name: ๐Ÿ›ก๏ธ scorecard +on: + branch_protection_rule: + schedule: + - cron: "43 8 * * 2" + push: + branches: ["main"] + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +permissions: {} +jobs: + analysis: + name: ๐Ÿ›ก๏ธ Scorecard analysis + if: github.repository == 'tox-dev/hatch-pep770' + permissions: + actions: read # read workflow runs for the Packaging check + checks: read # read check runs for the CI-Tests and SAST checks + contents: read # check out and scan the repository + id-token: write # authenticate the results published to the scorecard API + issues: read # read issue activity for the Maintained check + pull-requests: read # read reviews for the Code-Review check + security-events: write # upload the SARIF results to code scanning + statuses: read # read commit statuses for the CI-Tests check + uses: tox-dev/github-workflows/.github/workflows/scorecard.yaml@e1361e2efa1e9dd9705bb9be719d923cd9154707 # 6.7.1 diff --git a/.mdformat.toml b/.mdformat.toml new file mode 100644 index 0000000..a571de0 --- /dev/null +++ b/.mdformat.toml @@ -0,0 +1,2 @@ +wrap = 120 +number = true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..2a029eb --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,54 @@ +ci: + autoupdate_schedule: quarterly +default_language_version: + python: python3.15 +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: a76b92851fc9eede9f9bc4073eb55202f34eb0df # frozen: 0.39.0 + hooks: + - id: check-github-workflows + args: ["--verbose"] + - repo: https://github.com/rhysd/actionlint + rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # frozen: v1.7.12 + hooks: + - id: actionlint + args: ["-ignore", 'label "ubuntu-26[.]04" is unknown'] # GitHub offers this runner before actionlint lists it. + - repo: https://github.com/codespell-project/codespell + rev: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3 + hooks: + - id: codespell + - repo: https://github.com/tox-dev/pyproject-fmt + rev: "50e0f3aee9dc5747a5f173f79a7417403c18dda6" # frozen: v2.30.3 + hooks: + - id: pyproject-fmt + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: "25bcf95026b96e2dd3c0aec3090c3d6ef6ca2e6c" # frozen: v0.17.3 + hooks: + - id: ruff-format + - id: ruff-check + args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"] + - repo: https://github.com/hukkin/mdformat + rev: "82912cdaea4fb830f751504486a7879c70526547" # frozen: 1.0.0 + hooks: + - id: mdformat + additional_dependencies: + - mdformat-config==0.2.1 + - mdformat-gfm==1.0.0 + - mdformat-toc==0.5.0 + - repo: https://github.com/google/yamlfmt + rev: "21ca5323a9c87ee37a434e0ca908efc0a89daa07" # frozen: v0.21.0 + hooks: + - id: yamlfmt + - repo: https://github.com/zizmorcore/zizmor-pre-commit + rev: c92afdf2c6ca336aaa8f39e2bd8d48f62dbd8e1f # frozen: v1.31.1 + hooks: + - id: zizmor + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..b132379 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +# Changelog + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a1095ef --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,48 @@ +# Contributing + +Add a `changelog.d/+short-name..md` fragment for each user-visible change. Use a descriptive name instead of a +pull request number. After a squash merge, the release workflow links the fragment to the pull request. A pull request +with two separate user-visible changes needs two fragments. + +Do not write credits in fragments. The release credits come from the commit authors and `Co-authored-by` trailers, and +the prepare workflow runs `release-creator contributors` to add first-time contributors to the changelog. + +Use these categories: + +| Fragment suffix | Changelog heading | Use for | +| --------------- | ----------------- | --------------------------------------------------------- | +| `feature` | Added | New capabilities and Python support additions or removals | +| `change` | Changes | Changes to existing behavior | +| `bugfix` | Fixed | User-visible fixes | +| `doc` | Documentation | User documentation changes | +| `breaking` | Breaking changes | Incompatible changes to the public interface | +| `security` | Security | Security fixes users should know about | +| `performance` | Performance | User-visible speed or resource improvements | +| `deprecation` | Deprecated | Public features scheduled for removal | +| `removal` | Removed | Removed public features other than Python support | +| `packaging` | Packaging | Distribution or installation changes | + +For example, `changelog.d/+vendored-licenses.feature.md` could contain: + +```markdown +Record the licenses of packages that bundled wheels vendor. +``` + +Internal maintenance needs no fragment. Apply the `skip news` label to a human-authored maintenance pull request; the +bot labeling workflow handles supported automation. A bot-supplied fragment is kept. + +To preview pending news locally, install the locked release tools and let the fragments select the next version: + +```bash +uv venv --python 3.15 .tox/release-tools +uv pip sync --preview-features pylock --python .tox/release-tools/bin/python --group release-news pylock.toml +version=$(git tag --list | .tox/release-tools/bin/release-creator tags --next auto --directory changelog.d) +.tox/release-tools/bin/towncrier build --draft --version "$version" +``` + +The draft shows named fragments before merge. The final changelog gains pull request links after the squash commit is on +`main`, and the prepare workflow adds the credits. + +## Tests + +Add a test for every new feature and bug fix. A change without a test needs a reason in the pull request description. diff --git a/README.md b/README.md index ed8faf6..a8171e4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,117 @@ # hatch-pep770 -A [hatchling](https://hatch.pypa.io/latest/) build hook that writes a [CycloneDX](https://cyclonedx.org/) SBOM into -every wheel, where [PEP 770](https://peps.python.org/pep-0770/) says installers and scanners look for it. +[![PyPI](https://img.shields.io/pypi/v/hatch-pep770?style=flat-square)](https://pypi.org/project/hatch-pep770/) +[![Supported Python versions](https://img.shields.io/pypi/pyversions/hatch-pep770.svg)](https://pypi.org/project/hatch-pep770/) +[![check](https://github.com/tox-dev/hatch-pep770/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/hatch-pep770/actions/workflows/check.yaml) + +A [hatchling](https://hatch.pypa.io/latest/) build hook that writes a [CycloneDX](https://cyclonedx.org/) 1.6 SBOM into +every wheel at `-.dist-info/sboms/.cdx.json`, where [PEP 770](https://peps.python.org/pep-0770/) +says installers and scanners look for it. + +General-purpose SBOM scanners read installed environments or declared dependencies. They cannot see a wheel your project +bundles as a data file, and they say nothing about how a wheel was built. The SBOM this hook writes records: + +- the project, from its core metadata: version, license, maintainers, project URLs, classifiers, and the source revision + when the build runs in a git checkout; +- the runtime dependencies the wheel declares, unversioned, since the installer resolves them; +- every wheel the project bundles as a data file, with its SHA-256, license, files, and the packages it vendors; +- the build toolchain: the Python version, and every distribution in the build environment with its dependencies and, + for pure-Python ones, the hash of each file. + +It records nothing about the build machine and takes its timestamp from `SOURCE_DATE_EPOCH`, so rebuilding the same +source with the same toolchain and epoch reproduces the wheel byte for byte on any operating system or architecture. + +## Use it + +Add the hook to the build requirements and enable it: + +```toml +[build-system] +build-backend = "hatchling.build" +requires = ["hatch-pep770>=0.1", "hatchling>=1.28"] + +[tool.hatch.build.hooks.pep770] +``` + +hatchling 1.28 added SBOM support to wheels. With an older hatchling the hook prints a warning and the wheel carries no +SBOM, so a project that still builds on Python 3.9 (where hatchling stops at 1.27) can keep the hook enabled. + +The hook only acts on the wheel target. Put it after any hook that sets the wheel tag, since the SBOM names the wheel +file in its attestation link. + +## Options + +All options are optional. + +| Option | Default | Meaning | +| ---------------- | -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `supplier` | none | `{ name = "...", url = ["..."] }`, the organization that supplies the project; it becomes the SBOM's supplier and manufacturer and the project's supplier. | +| `repository` | the first `Source`, `Repository` or `GitHub` project URL | Repository URL for the source revision, license and security policy links. | +| `default-branch` | `main` | Branch used in links to files in the repository. | +| `bundled-wheels` | `[]` | Glob patterns, relative to the project root, of wheels the project ships as data files. | + +For example, a project that ships the wheels it installs into new environments: + +```toml +[tool.hatch.build.hooks.pep770] +supplier = { name = "Python Packaging Authority", url = [ + "https://www.pypa.io", +] } +bundled-wheels = ["src/virtualenv/seed/wheels/embed/*.whl"] +``` + +A bundled wheel whose project URLs point to the same forge account as `repository` gets the same `supplier`. Its +vendored packages come from `_vendor/vendor.txt` (pip's manifest, whose entries must pin one exact version) and from any +`.dist-info/METADATA` under `_vendor/`. + +Property names the hook writes start with the project name, for example `virtualenv:bundled-wheel`. + +## Add project-specific detail + +To say more about each bundled wheel, subclass the hook in a +[custom build hook](https://hatch.pypa.io/latest/plugins/build-hook/custom/) and override `bundled_wheel_properties`. +Its options then live under `[tool.hatch.build.hooks.custom]`, and the SBOM lists the script among the build tools: + +```python +# hatch_build.py +from __future__ import annotations + +from pathlib import Path + +from hatch_pep770 import cyclonedx, plugin + + +class SbomBuildHook(plugin.Pep770BuildHook): + def bundled_wheel_properties(self, wheel: Path) -> list[cyclonedx.Property]: + return [{"name": "example:installed-for-python", "value": "3.14"}] + + +def get_build_hook() -> type[SbomBuildHook]: + return SbomBuildHook +``` + +```toml +[tool.hatch.build.hooks.custom] +path = "hatch_build.py" +bundled-wheels = ["src/example/wheels/*.whl"] +``` + +The `get_build_hook` function tells hatchling which class to load, since the module also sees the base class. +`hatch_pep770.cyclonedx` holds the pieces the hook is built from (`build_tools`, `component_from_metadata`, `document`) +for describing other artifacts, such as a zipapp, the same way. + +## Command line + +```shell +hatch-pep770 spdx dist/example.cdx.json example.spdx.json +hatch-pep770 validate dist/ --allow-license MIT --allow-license Apache-2.0 +``` + +`spdx` renders an SBOM as [SPDX](https://spdx.dev/) 2.3 JSON for tools that read only SPDX. It keeps packages, hashes, +licenses, purls and the relationships, and leaves out per-file hashes (SPDX 2.3 wants a SHA-1 per file, wheel `RECORD` +files hold SHA-256) and the build formulation, which SPDX 2.3 has no field for. + +`validate` needs the `validate` extra (`pip install hatch-pep770[validate]`). For each wheel it checks that an SBOM +exists, conforms to the CycloneDX 1.6 schema, carries the `urn:uuid` serial number `actions/attest` needs to recognize +it, has unique and resolvable references, and renders as valid SPDX. With `--allow-license`, every bundled component +must also carry a license the given SPDX ids allow. diff --git a/changelog.d/+pep770-hook.feature.md b/changelog.d/+pep770-hook.feature.md new file mode 100644 index 0000000..708aa1e --- /dev/null +++ b/changelog.d/+pep770-hook.feature.md @@ -0,0 +1,2 @@ +Add the `pep770` hatchling build hook, which writes a CycloneDX 1.6 SBOM into the wheel at +`.dist-info/sboms/.cdx.json`, and the `hatch-pep770 spdx` and `hatch-pep770 validate` commands. diff --git a/changelog.d/.gitkeep b/changelog.d/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/pylock.toml b/pylock.toml new file mode 100644 index 0000000..64ef8ba --- /dev/null +++ b/pylock.toml @@ -0,0 +1,2972 @@ +lock-version = "1.0" +environments = [ + "python_version == \"3.15\" and sys_platform == \"linux\" and platform_machine == \"x86_64\" and implementation_name == \"cpython\" and platform_python_implementation == \"CPython\" and platform_system == \"Linux\"", + "python_version == \"3.15\" and sys_platform == \"darwin\" and platform_machine == \"arm64\" and platform_python_implementation == \"CPython\" and platform_system == \"Darwin\"", + "python_version == \"3.15\" and sys_platform == \"win32\" and platform_machine == \"AMD64\" and platform_python_implementation == \"CPython\" and platform_system == \"Windows\"", +] +requires-python = ">=3.9" +extras = [ + "validate", +] +dependency-groups = [ + "build", + "pkg-meta", + "project-runtime", + "release", + "release-news", + "release-notes", + "release-prepare", + "test", + "type", +] +default-groups = [ + "project-runtime", +] +created-by = "nab" + +[[packages]] +name = "annotated-types" +version = "0.8.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "annotated_types-0.8.0.tar.gz" +upload-time = 2026-07-23 20:16:13.995706+00:00 +url = "https://files.pythonhosted.org/packages/5f/56/a8120250d128bed162cd73c76d45f6ef9991f3e068f62a8ee060afa3104a/annotated_types-0.8.0.tar.gz" +size = 15893 + +[packages.sdist.hashes] +sha256 = "13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7" + +[[packages.wheels]] +name = "annotated_types-0.8.0-py3-none-any.whl" +upload-time = 2026-07-23 20:16:12.938651+00:00 +url = "https://files.pythonhosted.org/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl" +size = 13427 + +[packages.wheels.hashes] +sha256 = "f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0" + +[[packages]] +name = "arrow" +version = "1.4.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.8" +dependencies = [ + { name = "python-dateutil" }, + { name = "tzdata" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "arrow-1.4.0.tar.gz" +upload-time = 2025-10-18 17:46:46.761994+00:00 +url = "https://files.pythonhosted.org/packages/b9/33/032cdc44182491aa708d06a68b62434140d8c50820a087fac7af37703357/arrow-1.4.0.tar.gz" +size = 152931 + +[packages.sdist.hashes] +sha256 = "ed0cc050e98001b8779e84d461b0098c4ac597e88704a655582b21d116e526d7" + +[[packages.wheels]] +name = "arrow-1.4.0-py3-none-any.whl" +upload-time = 2025-10-18 17:46:45.663184+00:00 +url = "https://files.pythonhosted.org/packages/ed/c9/d7977eaacb9df673210491da99e6a247e93df98c715fc43fd136ce1d3d33/arrow-1.4.0-py3-none-any.whl" +size = 68797 + +[packages.wheels.hashes] +sha256 = "749f0769958ebdc79c173ff0b0670d59051a535fa26e8eba02953dc19eb43205" + +[[packages]] +name = "attrs" +version = "26.1.0" +marker = "\"pkg-meta\" in dependency_groups or \"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "attrs-26.1.0.tar.gz" +upload-time = 2026-03-19 14:22:25.026315+00:00 +url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz" +size = 952055 + +[packages.sdist.hashes] +sha256 = "d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32" + +[[packages.wheels]] +name = "attrs-26.1.0-py3-none-any.whl" +upload-time = 2026-03-19 14:22:23.645947+00:00 +url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl" +size = 67548 + +[packages.wheels.hashes] +sha256 = "c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309" + +[[packages]] +name = "beartype" +version = "0.23.1" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "beartype-0.23.1.tar.gz" +upload-time = 2026-10-11 05:36:55.251880+00:00 +url = "https://files.pythonhosted.org/packages/79/34/c0cfdaee9c796c8381439fed0fcab62810753b8b0adb1ec88fa7f41eaa5d/beartype-0.23.1.tar.gz" +size = 1993714 + +[packages.sdist.hashes] +sha256 = "8b805f246b32931c74f2b321ea0939fe5bb2ff43c12a3eff19cc4c854b832e1d" + +[[packages.wheels]] +name = "beartype-0.23.1-py3-none-any.whl" +upload-time = 2026-10-11 05:36:52.431648+00:00 +url = "https://files.pythonhosted.org/packages/1c/cb/2f6aa982e2860c1156830db3da7f823b71784ed7d533ca289ea9b6c6347a/beartype-0.23.1-py3-none-any.whl" +size = 1582101 + +[packages.wheels.hashes] +sha256 = "4461b4dc57e3fdd6c8a8464b22cf118002eea107c33e9fef651c69068ab3cce3" + +[[packages]] +name = "boolean-py" +version = "5.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "boolean_py-5.0.tar.gz" +upload-time = 2025-04-03 10:39:49.734090+00:00 +url = "https://files.pythonhosted.org/packages/c4/cf/85379f13b76f3a69bca86b60237978af17d6aa0bc5998978c3b8cf05abb2/boolean_py-5.0.tar.gz" +size = 37047 + +[packages.sdist.hashes] +sha256 = "60cbc4bad079753721d32649545505362c754e121570ada4658b852a3a318d95" + +[[packages.wheels]] +name = "boolean_py-5.0-py3-none-any.whl" +upload-time = 2025-04-03 10:39:48.449265+00:00 +url = "https://files.pythonhosted.org/packages/e5/ca/78d423b324b8d77900030fa59c4aa9054261ef0925631cd2501dd015b7b7/boolean_py-5.0-py3-none-any.whl" +size = 26577 + +[packages.wheels.hashes] +sha256 = "ef28a70bd43115208441b53a045d1549e2f0ec6e3d08a9d142cbc41c1938e8d9" + +[[packages]] +name = "certifi" +version = "2026.10.23" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "certifi-2026.10.23.tar.gz" +upload-time = 2026-10-23 11:36:16.478386+00:00 +url = "https://files.pythonhosted.org/packages/fd/11/b524cbd9bbdaca58608e4cf4053fd463417549e1959fa8d3aa18319f9555/certifi-2026.10.23.tar.gz" +size = 136225 + +[packages.sdist.hashes] +sha256 = "a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd" + +[[packages.wheels]] +name = "certifi-2026.10.23-py3-none-any.whl" +upload-time = 2026-10-23 11:36:14.763067+00:00 +url = "https://files.pythonhosted.org/packages/32/d1/a3652fe2c19134d0d15922177821d863cbd7e842d53a21bbe7e8e3a1b5ac/certifi-2026.10.23-py3-none-any.whl" +size = 135082 + +[packages.wheels.hashes] +sha256 = "e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1" + +[[packages]] +name = "cffi" +version = "2.1.1" +marker = "\"pkg-meta\" in dependency_groups and sys_platform == \"linux\"" +requires-python = ">=3.10" +dependencies = [ + { name = "pycparser" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "cffi-2.1.1.tar.gz" +upload-time = 2026-08-03 21:21:18.939988+00:00 +url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz" +size = 530807 + +[packages.sdist.hashes] +sha256 = "dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be" + +[[packages.wheels]] +name = "cffi-2.1.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +upload-time = 2026-08-03 21:20:57.336082+00:00 +url = "https://files.pythonhosted.org/packages/44/16/29e6d01b388bef055ecd6ca8244b3f4d336bd09e92d5d892187b9601084e/cffi-2.1.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +size = 221630 + +[packages.wheels.hashes] +sha256 = "aeae0e330c9f6acd681f647d46cefd30c29f93e3392882e792e82080c9691399" + +[[packages]] +name = "charset-normalizer" +version = "3.5.2" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "charset_normalizer-3.5.2.tar.gz" +upload-time = 2026-09-30 04:39:23.398219+00:00 +url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz" +size = 172659 + +[packages.sdist.hashes] +sha256 = "39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef" + +[[packages.wheels]] +name = "charset_normalizer-3.5.2-cp315-cp315-macosx_10_15_universal2.whl" +upload-time = 2026-09-30 04:37:28.329851+00:00 +url = "https://files.pythonhosted.org/packages/ca/e9/34e597dee616d0b8ee4b34d29399e85c2204ade174157a48505d42baa4ff/charset_normalizer-3.5.2-cp315-cp315-macosx_10_15_universal2.whl" +size = 367676 + +[packages.wheels.hashes] +sha256 = "87475fabc8d9996fd9c27debb395e642e8c838d78a00b6e932227a0e06b81e26" + +[[packages.wheels]] +name = "charset_normalizer-3.5.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl" +upload-time = 2026-09-30 04:37:37.397915+00:00 +url = "https://files.pythonhosted.org/packages/a0/a1/4fbf5d0f0f1b2a080474c1cf9a2f12c4c6531bb0e8ba591055e846d2b4e9/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl" +size = 257336 + +[packages.wheels.hashes] +sha256 = "3df041de8887954562c9b261cba85ca0e9ded74048daf125f45edcfaa4832229" + +[[packages.wheels]] +name = "charset_normalizer-3.5.2-cp315-cp315-win_amd64.whl" +upload-time = 2026-09-30 04:37:53.427053+00:00 +url = "https://files.pythonhosted.org/packages/98/e8/55d5fd3935b4bce6da4fe0df61898e8c82653e317e677bd58aceb9c60f13/charset_normalizer-3.5.2-cp315-cp315-win_amd64.whl" +size = 210858 + +[packages.wheels.hashes] +sha256 = "89b53f3cda69831909888e0494f4fa0bcd3537e3e138dabeb620bd6ad946bae8" + +[[packages.wheels]] +name = "charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl" +upload-time = 2026-09-30 04:38:26.216534+00:00 +url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl" +size = 331815 + +[packages.wheels.hashes] +sha256 = "4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd" + +[[packages.wheels]] +name = "charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl" +upload-time = 2026-09-30 04:38:28.032254+00:00 +url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl" +size = 253276 + +[packages.wheels.hashes] +sha256 = "1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7" + +[[packages.wheels]] +name = "charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl" +upload-time = 2026-09-30 04:38:49.707190+00:00 +url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl" +size = 200092 + +[packages.wheels.hashes] +sha256 = "9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036" + +[[packages.wheels]] +name = "charset_normalizer-3.5.2-py3-none-any.whl" +upload-time = 2026-09-30 04:39:21.828049+00:00 +url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl" +size = 68872 + +[packages.wheels.hashes] +sha256 = "b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685" + +[[packages]] +name = "check-wheel-contents" +version = "0.6.3" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "attrs" }, + { name = "click" }, + { name = "packaging" }, + { name = "pydantic" }, + { name = "wheel-filename" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "check_wheel_contents-0.6.3.tar.gz" +upload-time = 2025-08-02 14:01:45.546952+00:00 +url = "https://files.pythonhosted.org/packages/95/37/2b9e0d38c2f668791ffe8b97711185c364d91c027e47f189c371c2348d18/check_wheel_contents-0.6.3.tar.gz" +size = 586023 + +[packages.sdist.hashes] +sha256 = "10e6939e2fe4e6ce1edf2ff6ec6157808677e80782e78021ae139dd88473a442" + +[[packages.wheels]] +name = "check_wheel_contents-0.6.3-py3-none-any.whl" +upload-time = 2025-08-02 14:01:43.968164+00:00 +url = "https://files.pythonhosted.org/packages/be/05/f39fde9f31ef80b285ef5822fad4ddabf73fec62a1f02c5beb4b2f328972/check_wheel_contents-0.6.3-py3-none-any.whl" +size = 27541 + +[packages.wheels.hashes] +sha256 = "5ae39c8c434b972f0740d04610759168590713175aab584b012b1b84f6771874" + +[[packages]] +name = "click" +version = "8.5.0" +marker = "\"pkg-meta\" in dependency_groups or \"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups or \"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "click-8.5.0.tar.gz" +upload-time = 2026-08-26 13:33:14.560531+00:00 +url = "https://files.pythonhosted.org/packages/c7/0e/7fa0ef50764b67090eca4114772a2abf8b6148198475e54c660b97caeee6/click-8.5.0.tar.gz" +size = 382235 + +[packages.sdist.hashes] +sha256 = "ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34" + +[[packages.wheels]] +name = "click-8.5.0-py3-none-any.whl" +upload-time = 2026-08-26 13:33:12.928043+00:00 +url = "https://files.pythonhosted.org/packages/58/50/6c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3/click-8.5.0-py3-none-any.whl" +size = 125251 + +[packages.wheels.hashes] +sha256 = "255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360" + +[[packages]] +name = "colorama" +version = "0.4.6" +marker = "(\"test\" in dependency_groups or \"type\" in dependency_groups) and sys_platform == \"win32\"" +requires-python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "colorama-0.4.6.tar.gz" +upload-time = 2022-10-25 02:36:22.414799+00:00 +url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz" +size = 27697 + +[packages.sdist.hashes] +sha256 = "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" + +[[packages.wheels]] +name = "colorama-0.4.6-py2.py3-none-any.whl" +upload-time = 2022-10-25 02:36:20.889702+00:00 +url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl" +size = 25335 + +[packages.wheels.hashes] +sha256 = "4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6" + +[[packages]] +name = "covdefaults" +version = "2.3.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups" +requires-python = ">=3.7" +dependencies = [ + { name = "coverage" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "covdefaults-2.3.0.tar.gz" +upload-time = 2023-03-05 16:43:34.779146+00:00 +url = "https://files.pythonhosted.org/packages/44/ee/9a6f2611f72e4c5657ae5542a510cf4164d2c673687c0ea73bb1cbd85b4d/covdefaults-2.3.0.tar.gz" +size = 4835 + +[packages.sdist.hashes] +sha256 = "4e99f679f12d792bc62e5510fa3eb59546ed47bd569e36e4fddc4081c9c3ebf7" + +[[packages.wheels]] +name = "covdefaults-2.3.0-py2.py3-none-any.whl" +upload-time = 2023-03-05 16:43:33.245581+00:00 +url = "https://files.pythonhosted.org/packages/76/4c/823bc951445aa97e5a1b7e337690db3abf85212c8d138e170922e7916ac8/covdefaults-2.3.0-py2.py3-none-any.whl" +size = 5144 + +[packages.wheels.hashes] +sha256 = "2832961f6ffcfe4b57c338bc3418a3526f495c26fb9c54565409c5532f7c41be" + +[[packages]] +name = "coverage" +version = "7.17.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups" +requires-python = ">=3.11" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "coverage-7.17.0.tar.gz" +upload-time = 2026-10-22 16:06:50.009670+00:00 +url = "https://files.pythonhosted.org/packages/d2/79/e78bd8f75a9b8e32233ce92d4607f0a21ce88a9156cace2884e7175a82f5/coverage-7.17.0.tar.gz" +size = 991021 + +[packages.sdist.hashes] +sha256 = "cc010a0a7fbdd9bb8bdfd0d3f04a5151275860213cbd7e2b876b29778489c712" + +[[packages.wheels]] +name = "coverage-7.17.0-cp315-cp315-macosx_11_0_arm64.whl" +upload-time = 2026-10-22 16:06:06.167385+00:00 +url = "https://files.pythonhosted.org/packages/87/db/94697b9ccf4ec94cdad07bf94e2a21b9702247cb212d2d5f18d2b9c3d0de/coverage-7.17.0-cp315-cp315-macosx_11_0_arm64.whl" +size = 226193 + +[packages.wheels.hashes] +sha256 = "66efc0fb99cee34626fc17d3adac9c3cd816bfdad563bb1e983c3ef432f566d4" + +[[packages.wheels]] +name = "coverage-7.17.0-cp315-cp315-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl" +upload-time = 2026-10-22 16:06:08.861264+00:00 +url = "https://files.pythonhosted.org/packages/95/ee/84ed138990ed752abd73db4adffc1842d6152017d8e21809cc109a413fda/coverage-7.17.0-cp315-cp315-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl" +size = 261735 + +[packages.wheels.hashes] +sha256 = "aed06129a9f530a948928260d7d2d81c47261355b0127e3c782251b38958463c" + +[[packages.wheels]] +name = "coverage-7.17.0-cp315-cp315-win_amd64.whl" +upload-time = 2026-10-22 16:06:23.756207+00:00 +url = "https://files.pythonhosted.org/packages/43/14/283120142ac281834808584249b89957de997c28573ddd65ae106b622121/coverage-7.17.0-cp315-cp315-win_amd64.whl" +size = 228532 + +[packages.wheels.hashes] +sha256 = "79cf71e5f9a48877ccfed5baa2c72f45af4feeaa596249e23eb15b473134830e" + +[[packages.wheels]] +name = "coverage-7.17.0-py3-none-any.whl" +upload-time = 2026-10-22 16:06:48.471847+00:00 +url = "https://files.pythonhosted.org/packages/c9/17/48032919343afa2906112d458aceda2043afdb24a2ee8eb4c60904d8ddf1/coverage-7.17.0-py3-none-any.whl" +size = 217383 + +[packages.wheels.hashes] +sha256 = "bac487dce0d2aff28ddf1a533a916f771416eee0e493960f611e49037b878e9d" + +[[packages]] +name = "cryptography" +version = "50.0.2" +marker = "\"pkg-meta\" in dependency_groups and sys_platform == \"linux\"" +requires-python = "!=3.9.0,!=3.9.1,>=3.9" +dependencies = [ + { name = "cffi" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "cryptography-50.0.2.tar.gz" +upload-time = 2026-09-30 15:30:04.884601+00:00 +url = "https://files.pythonhosted.org/packages/9d/af/182eb91b0df3fe75c4d9f26fe70684569566745f6ba7e5c9c73a862c5252/cryptography-50.0.2.tar.gz" +size = 880623 + +[packages.sdist.hashes] +sha256 = "7b46165bb56eb4704e2eaaf86f3c940d19154535d9b0ca7d6d590b04060e00d5" + +[[packages.wheels]] +name = "cryptography-50.0.2-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +upload-time = 2026-09-30 14:43:49.010540+00:00 +url = "https://files.pythonhosted.org/packages/21/69/64cef1f702bf6657e0cc186ed1a2891d50d29fb41586b254e1c07adea261/cryptography-50.0.2-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +size = 4719841 + +[packages.wheels.hashes] +sha256 = "630ebfea3bf689d075f82316324ff7433dc447fe6bc1bfc76524b74b4a9567d2" + +[[packages.wheels]] +name = "cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl" +upload-time = 2026-09-30 14:43:55.272150+00:00 +url = "https://files.pythonhosted.org/packages/1a/f1/b474e930c4d910328780e3940da76f5aa5cbc48ce1fc14e44d239d9ea9db/cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl" +size = 4753050 + +[packages.wheels.hashes] +sha256 = "4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856" + +[[packages.wheels]] +name = "cryptography-50.0.2-cp311-abi3-manylinux_2_34_x86_64.whl" +upload-time = 2026-09-30 14:44:04.545137+00:00 +url = "https://files.pythonhosted.org/packages/d3/69/2c833a049475e0a3444e94c7d0aca0aa51d166374a449b09e92ac98138de/cryptography-50.0.2-cp311-abi3-manylinux_2_34_x86_64.whl" +size = 4752576 + +[packages.wheels.hashes] +sha256 = "9dab55f57c74c3cad24c323bacbbd04be4705ba6eb0d92e920b1fc4837ed5079" + +[[packages.wheels]] +name = "cryptography-50.0.2-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +upload-time = 2026-09-30 14:44:45.769143+00:00 +url = "https://files.pythonhosted.org/packages/aa/a4/2c8d734e43d97f0842ee9f1b7b4bfb3d0cf5e19edebf43c2afe6675c2320/cryptography-50.0.2-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +size = 4966465 + +[packages.wheels.hashes] +sha256 = "f2f9bd7f90c64fe89253f0a2c05e3c4856072660429ce8831b4235bf29403a67" + +[[packages.wheels]] +name = "cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl" +upload-time = 2026-09-30 14:44:53.379605+00:00 +url = "https://files.pythonhosted.org/packages/02/a8/8df951850d6b31d2a00218f19e2b3f999523437ed7a819df7fa427942fca/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl" +size = 5001199 + +[packages.wheels.hashes] +sha256 = "58a0c478eeca76fe5e07993c5a0703def34a6dc6a0cda4f5564639b33112ffe7" + +[[packages.wheels]] +name = "cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_x86_64.whl" +upload-time = 2026-09-30 14:45:05.009031+00:00 +url = "https://files.pythonhosted.org/packages/24/95/83378121ef3eaaaf71d4b781577ff794acb39b9e1b87a3f156898c8497ed/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_x86_64.whl" +size = 5000859 + +[packages.wheels.hashes] +sha256 = "e105ab60406787da31fccc883fc0f733af1efd78f0136a4599692c4083a73d0c" + +[[packages.wheels]] +name = "cryptography-50.0.2-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +upload-time = 2026-09-30 15:29:26.807001+00:00 +url = "https://files.pythonhosted.org/packages/bf/f1/1c1f6874e8550cfddd4b688ceb38cefb6ed15ceed224d56f133f3d88c214/cryptography-50.0.2-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +size = 4749145 + +[packages.wheels.hashes] +sha256 = "ee247f5c245c9a2fe7c8e2214e295918838e44e00a45a6718451e4004219e767" + +[[packages.wheels]] +name = "cryptography-50.0.2-cp39-abi3-manylinux_2_28_x86_64.whl" +upload-time = 2026-09-30 15:29:32.605292+00:00 +url = "https://files.pythonhosted.org/packages/4f/87/ef344a9e616871f2519c22d6afcda79ddd5d35e9592d95eb6e677608d055/cryptography-50.0.2-cp39-abi3-manylinux_2_28_x86_64.whl" +size = 4781387 + +[packages.wheels.hashes] +sha256 = "f21e8a22c8605750c7af886bab299a363721264061b4ac0a30efb73cfd58efc5" + +[[packages.wheels]] +name = "cryptography-50.0.2-cp39-abi3-manylinux_2_34_x86_64.whl" +upload-time = 2026-09-30 15:29:41.251208+00:00 +url = "https://files.pythonhosted.org/packages/40/cf/6b5c8e2fd9202d98988ab7cb5cc5c991704c4ad55f492ff408e4969f83f1/cryptography-50.0.2-cp39-abi3-manylinux_2_34_x86_64.whl" +size = 4780973 + +[packages.wheels.hashes] +sha256 = "1981f1db4630889b9ef7803fadef12b056f428cb6b85c27ba57b774793b6093c" + +[[packages]] +name = "cyclonedx-python-lib" +version = "11.12.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = "<4.0,>=3.9" +dependencies = [ + { name = "jsonschema" }, + { name = "license-expression" }, + { name = "packageurl-python" }, + { name = "py-serializable" }, + { name = "referencing" }, + { name = "sortedcontainers" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "cyclonedx_python_lib-11.12.0.tar.gz" +upload-time = 2026-08-13 07:52:18.675291+00:00 +url = "https://files.pythonhosted.org/packages/17/40/6509e6cfd7f2f3255501690f46375fdd224949e21fd1e96f4f4c8a9041b1/cyclonedx_python_lib-11.12.0.tar.gz" +size = 1445378 + +[packages.sdist.hashes] +sha256 = "16767c4039de90c04e9f03348f8f0ed4b8ff842eaa7eefcad3a95685f970dacf" + +[[packages.wheels]] +name = "cyclonedx_python_lib-11.12.0-py3-none-any.whl" +upload-time = 2026-08-13 07:52:16.836824+00:00 +url = "https://files.pythonhosted.org/packages/cf/f0/b2cb999244f2f4194df63ecff6939228178fa63a33be809c412684ca8db7/cyclonedx_python_lib-11.12.0-py3-none-any.whl" +size = 529453 + +[packages.wheels.hashes] +sha256 = "0e807521a921a5c3cb8ce1153f8a61d29eedfe76a46aac2796b7c6b573391a54" + +[[packages]] +name = "defusedxml" +version = "0.7.1" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "defusedxml-0.7.1.tar.gz" +upload-time = 2021-03-08 10:59:26.269532+00:00 +url = "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz" +size = 75520 + +[packages.sdist.hashes] +sha256 = "1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" + +[[packages.wheels]] +name = "defusedxml-0.7.1-py2.py3-none-any.whl" +upload-time = 2021-03-08 10:59:24.450195+00:00 +url = "https://files.pythonhosted.org/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl" +size = 25604 + +[packages.wheels.hashes] +sha256 = "a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61" + +[[packages]] +name = "docutils" +version = "0.23" +marker = "\"pkg-meta\" in dependency_groups or \"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "docutils-0.23.tar.gz" +upload-time = 2026-05-27 17:41:06.934109+00:00 +url = "https://files.pythonhosted.org/packages/39/a4/5180d9afc57e8fca05601dd652bdff19604c218814037fe90ffc7625a50a/docutils-0.23.tar.gz" +size = 2303823 + +[packages.sdist.hashes] +sha256 = "746f5060322511280a1e50eb76846ed6bf2342984b2ac04dc42caa1a8d78799e" + +[[packages.wheels]] +name = "docutils-0.23-py3-none-any.whl" +upload-time = 2026-05-27 17:40:58.442528+00:00 +url = "https://files.pythonhosted.org/packages/32/91/30151a39f7570f448ed84529390628a651d7f27c87d73c9b887f8189695e/docutils-0.23-py3-none-any.whl" +size = 634701 + +[packages.wheels.hashes] +sha256 = "25d013af9bf23bc1c7b2b093dff4208166c53a94786c9e447808335ef1185fea" + +[[packages]] +name = "fqdn" +version = "1.6.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<4,>=2.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "fqdn-1.6.0.tar.gz" +upload-time = 2026-09-28 05:43:35.482270+00:00 +url = "https://files.pythonhosted.org/packages/02/01/248d44fbda9e78fa1a7b5a475194bef4c4a3e285db286419f3bb42f2efdf/fqdn-1.6.0.tar.gz" +size = 130737 + +[packages.sdist.hashes] +sha256 = "e39bf62e2a9481aa2cb780554fdfd944dd8ee5f230eb831684d539cbafed8de2" + +[[packages.wheels]] +name = "fqdn-1.6.0-py3-none-any.whl" +upload-time = 2026-09-28 05:43:33.951821+00:00 +url = "https://files.pythonhosted.org/packages/15/d5/a8f9149b97cced9e1f4bff92ff0b6206120e2c853ae774d7020d6ecd8fa8/fqdn-1.6.0-py3-none-any.whl" +size = 12569 + +[packages.wheels.hashes] +sha256 = "6c793c312ccfa29981e1135b3ef5e1277ebe639731a6b0f7350d90e96e63f0b4" + +[[packages]] +name = "hatch-vcs" +version = "0.5.0" +marker = "\"build\" in dependency_groups" +requires-python = ">=3.9" +dependencies = [ + { name = "hatchling" }, + { name = "setuptools-scm" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "hatch_vcs-0.5.0.tar.gz" +upload-time = 2025-05-27 05:16:04.490926+00:00 +url = "https://files.pythonhosted.org/packages/6b/b0/4cc743d38adbee9d57d786fa496ed1daadb17e48589b6da8fa55717a0746/hatch_vcs-0.5.0.tar.gz" +size = 11424 + +[packages.sdist.hashes] +sha256 = "0395fa126940340215090c344a2bf4e2a77bcbe7daab16f41b37b98c95809ff9" + +[[packages.wheels]] +name = "hatch_vcs-0.5.0-py3-none-any.whl" +upload-time = 2025-05-27 05:16:03.184909+00:00 +url = "https://files.pythonhosted.org/packages/5f/48/1f85cee4b7b4f40b9b814b1febbc661bda6ced9649e410a0b74f6e415dd0/hatch_vcs-0.5.0-py3-none-any.whl" +size = 8507 + +[packages.wheels.hashes] +sha256 = "b49677dbdc597460cc22d01b27ab3696f5e16a21ecf2700fb01bc28e1f2a04a7" + +[[packages]] +name = "hatchling" +version = "1.33.0" +marker = "\"build\" in dependency_groups or \"project-runtime\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "packaging" }, + { name = "pathspec" }, + { name = "pluggy" }, + { name = "tomlkit" }, + { name = "trove-classifiers" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "hatchling-1.33.0.tar.gz" +upload-time = 2026-10-28 02:27:30.694770+00:00 +url = "https://files.pythonhosted.org/packages/7a/f1/e47b937226ae3b093bbd0132eb0b7ee5bfad12c2b5324afd10ae49946b05/hatchling-1.33.0.tar.gz" +size = 58079 + +[packages.sdist.hashes] +sha256 = "4c422bd4d554fcff5de5b73e9596f85e41e9f97f7e553d8f7595ecb31a627bef" + +[[packages.wheels]] +name = "hatchling-1.33.0-py3-none-any.whl" +upload-time = 2026-10-28 02:27:29.033037+00:00 +url = "https://files.pythonhosted.org/packages/32/64/4afe5dd77b2939a93e8c9513f8082dbd049ecba9c1484a379a0f6ae29d6b/hatchling-1.33.0-py3-none-any.whl" +size = 78750 + +[packages.wheels.hashes] +sha256 = "415290b84f464d2884303fca8974d38e7b85579069fab02a15db0828fbb1446d" + +[[packages]] +name = "id" +version = "1.6.1" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.9" +dependencies = [ + { name = "urllib3" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "id-1.6.1.tar.gz" +upload-time = 2026-02-04 16:19:41.260133+00:00 +url = "https://files.pythonhosted.org/packages/6d/04/c2156091427636080787aac190019dc64096e56a23b7364d3c1764ee3a06/id-1.6.1.tar.gz" +size = 18088 + +[packages.sdist.hashes] +sha256 = "d0732d624fb46fd4e7bc4e5152f00214450953b9e772c182c1c22964def1a069" + +[[packages.wheels]] +name = "id-1.6.1-py3-none-any.whl" +upload-time = 2026-02-04 16:19:40.051745+00:00 +url = "https://files.pythonhosted.org/packages/42/77/de194443bf38daed9452139e960c632b0ef9f9a5dd9ce605fdf18ca9f1b1/id-1.6.1-py3-none-any.whl" +size = 14689 + +[packages.wheels.hashes] +sha256 = "f5ec41ed2629a508f5d0988eda142e190c9c6da971100612c4de9ad9f9b237ca" + +[[packages]] +name = "idna" +version = "3.20" +marker = "\"pkg-meta\" in dependency_groups or \"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "idna-3.20.tar.gz" +upload-time = 2026-09-17 14:11:04.752193+00:00 +url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz" +size = 216463 + +[packages.sdist.hashes] +sha256 = "a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44" + +[[packages.wheels]] +name = "idna-3.20-py3-none-any.whl" +upload-time = 2026-09-17 14:11:03.168153+00:00 +url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl" +size = 69583 + +[packages.wheels.hashes] +sha256 = "ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c" + +[[packages]] +name = "iniconfig" +version = "2.3.1" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "iniconfig-2.3.1.tar.gz" +upload-time = 2026-10-06 22:48:38.076390+00:00 +url = "https://files.pythonhosted.org/packages/01/e1/2069291243c926a2ff1cd706c7f3eeb9b62144bf60f77c9fb9ff2fb26bd3/iniconfig-2.3.1.tar.gz" +size = 21209 + +[packages.sdist.hashes] +sha256 = "67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960" + +[[packages.wheels]] +name = "iniconfig-2.3.1-py3-none-any.whl" +upload-time = 2026-10-06 22:48:36.959685+00:00 +url = "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl" +size = 7552 + +[packages.wheels.hashes] +sha256 = "9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7" + +[[packages]] +name = "isoduration" +version = "20.11.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.7" +dependencies = [ + { name = "arrow" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "isoduration-20.11.0.tar.gz" +upload-time = 2020-11-01 11:00:00.312591+00:00 +url = "https://files.pythonhosted.org/packages/7c/1a/3c8edc664e06e6bd06cce40c6b22da5f1429aa4224d0c590f3be21c91ead/isoduration-20.11.0.tar.gz" +size = 11649 + +[packages.sdist.hashes] +sha256 = "ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9" + +[[packages.wheels]] +name = "isoduration-20.11.0-py3-none-any.whl" +upload-time = 2020-11-01 10:59:58.020369+00:00 +url = "https://files.pythonhosted.org/packages/7b/55/e5326141505c5d5e34c5e0935d2908a74e4561eca44108fbfb9c13d2911a/isoduration-20.11.0-py3-none-any.whl" +size = 11321 + +[packages.wheels.hashes] +sha256 = "b2904c2a4228c3d44f409c8ae8e2370eb21a26f7ac2ec5446df141dde3452042" + +[[packages]] +name = "jaraco-classes" +version = "3.4.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.8" +dependencies = [ + { name = "more-itertools" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "jaraco.classes-3.4.0.tar.gz" +upload-time = 2024-03-31 07:27:36.643708+00:00 +url = "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz" +size = 11780 + +[packages.sdist.hashes] +sha256 = "47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd" + +[[packages.wheels]] +name = "jaraco.classes-3.4.0-py3-none-any.whl" +upload-time = 2024-03-31 07:27:34.792832+00:00 +url = "https://files.pythonhosted.org/packages/7f/66/b15ce62552d84bbfcec9a4873ab79d993a1dd4edb922cbfccae192bd5b5f/jaraco.classes-3.4.0-py3-none-any.whl" +size = 6777 + +[packages.wheels.hashes] +sha256 = "f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790" + +[[packages]] +name = "jaraco-context" +version = "6.1.2" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "jaraco_context-6.1.2.tar.gz" +upload-time = 2026-03-20 22:13:33.922545+00:00 +url = "https://files.pythonhosted.org/packages/af/50/4763cd07e722bb6285316d390a164bc7e479db9d90daa769f22578f698b4/jaraco_context-6.1.2.tar.gz" +size = 16801 + +[packages.sdist.hashes] +sha256 = "f1a6c9d391e661cc5b8d39861ff077a7dc24dc23833ccee564b234b81c82dfe3" + +[[packages.wheels]] +name = "jaraco_context-6.1.2-py3-none-any.whl" +upload-time = 2026-03-20 22:13:32.808832+00:00 +url = "https://files.pythonhosted.org/packages/f2/58/bc8954bda5fcda97bd7c19be11b85f91973d67a706ed4a3aec33e7de22db/jaraco_context-6.1.2-py3-none-any.whl" +size = 7871 + +[packages.wheels.hashes] +sha256 = "bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535" + +[[packages]] +name = "jaraco-functools" +version = "4.6.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "more-itertools" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "jaraco_functools-4.6.0.tar.gz" +upload-time = 2026-07-14 01:28:02.544761+00:00 +url = "https://files.pythonhosted.org/packages/6c/1f/c23395957d41ccf27c4e535c3d334c4051e5395b3752057ba4cbaec35c56/jaraco_functools-4.6.0.tar.gz" +size = 20837 + +[packages.sdist.hashes] +sha256 = "880c577ec9720b3a052d5bc611fb9f2269b3d87902ef42440df443b88e443280" + +[[packages.wheels]] +name = "jaraco_functools-4.6.0-py3-none-any.whl" +upload-time = 2026-07-14 01:28:01.590470+00:00 +url = "https://files.pythonhosted.org/packages/02/36/ecc85bc96c273dc8a11273ed4782272975e6338d4a3e9228621175edf0e3/jaraco_functools-4.6.0-py3-none-any.whl" +size = 11677 + +[packages.wheels.hashes] +sha256 = "99e3dc0060c5cbe8fcd1cdb36258e2a65ca40f1566b2033b12abb1bb44dd3c30" + +[[packages]] +name = "jeepney" +version = "0.9.0" +marker = "\"pkg-meta\" in dependency_groups and sys_platform == \"linux\"" +requires-python = ">=3.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "jeepney-0.9.0.tar.gz" +upload-time = 2025-02-27 18:51:01.684959+00:00 +url = "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz" +size = 106758 + +[packages.sdist.hashes] +sha256 = "cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732" + +[[packages.wheels]] +name = "jeepney-0.9.0-py3-none-any.whl" +upload-time = 2025-02-27 18:51:00.104279+00:00 +url = "https://files.pythonhosted.org/packages/b2/a3/e137168c9c44d18eff0376253da9f1e9234d0239e0ee230d2fee6cea8e55/jeepney-0.9.0-py3-none-any.whl" +size = 49010 + +[packages.wheels.hashes] +sha256 = "97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683" + +[[packages]] +name = "jinja2" +version = "3.1.6" +marker = "\"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.7" +dependencies = [ + { name = "markupsafe" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "jinja2-3.1.6.tar.gz" +upload-time = 2025-03-05 20:05:02.478302+00:00 +url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz" +size = 245115 + +[packages.sdist.hashes] +sha256 = "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" + +[[packages.wheels]] +name = "jinja2-3.1.6-py3-none-any.whl" +upload-time = 2025-03-05 20:05:00.369721+00:00 +url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl" +size = 134899 + +[packages.wheels.hashes] +sha256 = "85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67" + +[[packages]] +name = "jsonpointer" +version = "3.6" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "jsonpointer-3.6.tar.gz" +upload-time = 2026-10-26 20:59:26.307086+00:00 +url = "https://files.pythonhosted.org/packages/54/04/e35b34f4e441473e62d82d6ed9a8f748d93d895f4c05d4e645aa0fde51d7/jsonpointer-3.6.tar.gz" +size = 14352 + +[packages.sdist.hashes] +sha256 = "82e839a3ba3a9e2b54394fda8b3d276c2459d80408d06ef9a6fbc369d7544ffc" + +[[packages.wheels]] +name = "jsonpointer-3.6-py3-none-any.whl" +upload-time = 2026-10-26 20:59:24.947043+00:00 +url = "https://files.pythonhosted.org/packages/6e/34/cee746fb30473bfaa92f19267fcc102a1118eaec83e7e2b5652a91ead01c/jsonpointer-3.6-py3-none-any.whl" +size = 9333 + +[packages.wheels.hashes] +sha256 = "a45c858f8a9e171f6b3790ed9446c9382782f6c4cb4589176813c5a553f4cfcd" + +[[packages]] +name = "jsonschema" +version = "4.26.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.10" +dependencies = [ + { name = "attrs" }, + { name = "fqdn" }, + { name = "idna" }, + { name = "isoduration" }, + { name = "jsonpointer" }, + { name = "jsonschema-specifications" }, + { name = "referencing" }, + { name = "rfc3339-validator" }, + { name = "rfc3986-validator" }, + { name = "rfc3987-syntax" }, + { name = "rpds-py" }, + { name = "uri-template" }, + { name = "webcolors" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "jsonschema-4.26.0.tar.gz" +upload-time = 2026-01-07 13:41:07.246891+00:00 +url = "https://files.pythonhosted.org/packages/b3/fc/e067678238fa451312d4c62bf6e6cf5ec56375422aee02f9cb5f909b3047/jsonschema-4.26.0.tar.gz" +size = 366583 + +[packages.sdist.hashes] +sha256 = "0c26707e2efad8aa1bfc5b7ce170f3fccc2e4918ff85989ba9ffa9facb2be326" + +[[packages.wheels]] +name = "jsonschema-4.26.0-py3-none-any.whl" +upload-time = 2026-01-07 13:41:05.306692+00:00 +url = "https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl" +size = 90630 + +[packages.wheels.hashes] +sha256 = "d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce" + +[[packages]] +name = "jsonschema-specifications" +version = "2025.9.1" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.9" +dependencies = [ + { name = "referencing" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "jsonschema_specifications-2025.9.1.tar.gz" +upload-time = 2025-09-08 01:34:59.186960+00:00 +url = "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz" +size = 32855 + +[packages.sdist.hashes] +sha256 = "b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" + +[[packages.wheels]] +name = "jsonschema_specifications-2025.9.1-py3-none-any.whl" +upload-time = 2025-09-08 01:34:57.871954+00:00 +url = "https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl" +size = 18437 + +[packages.wheels.hashes] +sha256 = "98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe" + +[[packages]] +name = "keyring" +version = "25.7.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.9" +dependencies = [ + { name = "jaraco-classes" }, + { name = "jaraco-context" }, + { name = "jaraco-functools" }, + { name = "jeepney" }, + { name = "pywin32-ctypes" }, + { name = "secretstorage" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "keyring-25.7.0.tar.gz" +upload-time = 2025-11-16 16:26:09.482176+00:00 +url = "https://files.pythonhosted.org/packages/43/4b/674af6ef2f97d56f0ab5153bf0bfa28ccb6c3ed4d1babf4305449668807b/keyring-25.7.0.tar.gz" +size = 63516 + +[packages.sdist.hashes] +sha256 = "fe01bd85eb3f8fb3dd0405defdeac9a5b4f6f0439edbb3149577f244a2e8245b" + +[[packages.wheels]] +name = "keyring-25.7.0-py3-none-any.whl" +upload-time = 2025-11-16 16:26:08.402146+00:00 +url = "https://files.pythonhosted.org/packages/81/db/e655086b7f3a705df045bf0933bdd9c2f79bb3c97bfef1384598bb79a217/keyring-25.7.0-py3-none-any.whl" +size = 39160 + +[packages.wheels.hashes] +sha256 = "be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f" + +[[packages]] +name = "lark" +version = "1.3.1" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.8" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "lark-1.3.1.tar.gz" +upload-time = 2025-10-27 18:25:56.653447+00:00 +url = "https://files.pythonhosted.org/packages/da/34/28fff3ab31ccff1fd4f6c7c7b0ceb2b6968d8ea4950663eadcb5720591a0/lark-1.3.1.tar.gz" +size = 382732 + +[packages.sdist.hashes] +sha256 = "b426a7a6d6d53189d318f2b6236ab5d6429eaf09259f1ca33eb716eed10d2905" + +[[packages.wheels]] +name = "lark-1.3.1-py3-none-any.whl" +upload-time = 2025-10-27 18:25:54.882451+00:00 +url = "https://files.pythonhosted.org/packages/82/3d/14ce75ef66813643812f3093ab17e46d3a206942ce7376d31ec2d36229e7/lark-1.3.1-py3-none-any.whl" +size = 113151 + +[packages.wheels.hashes] +sha256 = "c629b661023a014c37da873b4ff58a817398d12635d3bbb2c5a03be7fe5d1e12" + +[[packages]] +name = "license-expression" +version = "30.4.4" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.9" +dependencies = [ + { name = "boolean-py" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "license_expression-30.4.4.tar.gz" +upload-time = 2025-07-22 11:13:32.170576+00:00 +url = "https://files.pythonhosted.org/packages/40/71/d89bb0e71b1415453980fd32315f2a037aad9f7f70f695c7cec7035feb13/license_expression-30.4.4.tar.gz" +size = 186402 + +[packages.sdist.hashes] +sha256 = "73448f0aacd8d0808895bdc4b2c8e01a8d67646e4188f887375398c761f340fd" + +[[packages.wheels]] +name = "license_expression-30.4.4-py3-none-any.whl" +upload-time = 2025-07-22 11:13:31.217173+00:00 +url = "https://files.pythonhosted.org/packages/af/40/791891d4c0c4dab4c5e187c17261cedc26285fd41541577f900470a45a4d/license_expression-30.4.4-py3-none-any.whl" +size = 120615 + +[packages.wheels.hashes] +sha256 = "421788fdcadb41f049d2dc934ce666626265aeccefddd25e162a26f23bcbf8a4" + +[[packages]] +name = "markdown-it-py" +version = "4.2.0" +marker = "\"pkg-meta\" in dependency_groups or \"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "mdurl" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "markdown_it_py-4.2.0.tar.gz" +upload-time = 2026-05-07 12:08:28.360612+00:00 +url = "https://files.pythonhosted.org/packages/06/ff/7841249c247aa650a76b9ee4bbaeae59370dc8bfd2f6c01f3630c35eb134/markdown_it_py-4.2.0.tar.gz" +size = 82454 + +[packages.sdist.hashes] +sha256 = "04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49" + +[[packages.wheels]] +name = "markdown_it_py-4.2.0-py3-none-any.whl" +upload-time = 2026-05-07 12:08:27.182789+00:00 +url = "https://files.pythonhosted.org/packages/b3/81/4da04ced5a082363ecfa159c010d200ecbd959ae410c10c0264a38cac0f5/markdown_it_py-4.2.0-py3-none-any.whl" +size = 91687 + +[packages.wheels.hashes] +sha256 = "9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a" + +[[packages]] +name = "markupsafe" +version = "3.0.4" +marker = "\"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "markupsafe-3.0.4.tar.gz" +upload-time = 2026-10-02 23:07:22.290270+00:00 +url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz" +size = 153777 + +[packages.sdist.hashes] +sha256 = "2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6" + +[[packages.wheels]] +name = "markupsafe-3.0.4-cp315-cp315-macosx_11_0_arm64.whl" +upload-time = 2026-10-02 23:06:17.855823+00:00 +url = "https://files.pythonhosted.org/packages/96/24/3ec292b44064c16229e064d770b2625bd8ea941aa61f44905a9fa44942c0/markupsafe-3.0.4-cp315-cp315-macosx_11_0_arm64.whl" +size = 12075 + +[packages.wheels.hashes] +sha256 = "ae9dcb8fbe244cb82f8a6458b455b927a03685e383d9bacf1ea5ce180b96dc97" + +[[packages.wheels]] +name = "markupsafe-3.0.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl" +upload-time = 2026-10-02 23:06:22.524416+00:00 +url = "https://files.pythonhosted.org/packages/82/96/ef49135ce260db4ca4a12b119ed468449cd248db6b1468e2112b546d7a2e/markupsafe-3.0.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl" +size = 23111 + +[packages.wheels.hashes] +sha256 = "925f929d6b59a8b3f8b8c6ac363cd0af7eecc81efb3071770b3c6717c450a369" + +[[packages.wheels]] +name = "markupsafe-3.0.4-cp315-cp315-win_amd64.whl" +upload-time = 2026-10-02 23:06:33.258900+00:00 +url = "https://files.pythonhosted.org/packages/5b/ec/6000fd82e8791e58fcd0456ec20f098957e2b03d5ed02eb73241a577c0ba/markupsafe-3.0.4-cp315-cp315-win_amd64.whl" +size = 14496 + +[packages.wheels.hashes] +sha256 = "d882a373d8093c2941e01291b7ced96e9cbe4781da9a7751ca7e6c70385e5214" + +[[packages]] +name = "mdformat" +version = "1.0.0" +marker = "\"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "markdown-it-py" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "mdformat-1.0.0.tar.gz" +upload-time = 2025-10-16 12:05:03.695033+00:00 +url = "https://files.pythonhosted.org/packages/3f/05/32b5e14b192b0a8a309f32232c580aefedd9d06017cb8fe8fce34bec654c/mdformat-1.0.0.tar.gz" +size = 56953 + +[packages.sdist.hashes] +sha256 = "4954045fcae797c29f86d4ad879e43bb151fa55dbaf74ac6eaeacf1d45bb3928" + +[[packages.wheels]] +name = "mdformat-1.0.0-py3-none-any.whl" +upload-time = 2025-10-16 12:05:02.607432+00:00 +url = "https://files.pythonhosted.org/packages/54/9a/8fe71b95985ca7a4001effbcc58e5a07a1f2a2884203f74dcf48a3b08315/mdformat-1.0.0-py3-none-any.whl" +size = 53288 + +[packages.wheels.hashes] +sha256 = "bca015d65a1d063a02e885a91daee303057bc7829c2cd37b2075a50dbb65944b" + +[[packages]] +name = "mdformat-gfm" +version = "1.0.0" +marker = "\"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "markdown-it-py" }, + { name = "mdformat" }, + { name = "mdit-py-plugins" }, + { name = "wcwidth" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "mdformat_gfm-1.0.0.tar.gz" +upload-time = 2025-10-16 09:12:22.402429+00:00 +url = "https://files.pythonhosted.org/packages/56/6f/a626ebb142a290474401b67e2d61e73ce096bf7798ee22dfe6270f924b3f/mdformat_gfm-1.0.0.tar.gz" +size = 10112 + +[packages.sdist.hashes] +sha256 = "d1d49a409a6acb774ce7635c72d69178df7dce1dc8cdd10e19f78e8e57b72623" + +[[packages.wheels]] +name = "mdformat_gfm-1.0.0-py3-none-any.whl" +upload-time = 2025-10-16 09:12:21.276157+00:00 +url = "https://files.pythonhosted.org/packages/e6/18/6bc2189b744dd383cad03764f41f30352b1278d2205096f77a29c0b327ad/mdformat_gfm-1.0.0-py3-none-any.whl" +size = 10970 + +[packages.wheels.hashes] +sha256 = "7305a50efd2a140d7c83505b58e3ac5df2b09e293f9bbe72f6c7bee8c678b005" + +[[packages]] +name = "mdit-py-plugins" +version = "0.6.1" +marker = "\"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "markdown-it-py" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "mdit_py_plugins-0.6.1.tar.gz" +upload-time = 2026-05-13 09:03:38.910230+00:00 +url = "https://files.pythonhosted.org/packages/59/fc/f8d0863f8862f25602c0404d75568e89fb6b4109804645e5cdfb1be5cf56/mdit_py_plugins-0.6.1.tar.gz" +size = 56114 + +[packages.sdist.hashes] +sha256 = "a2bca0f039f39dbd35fb74ae1b5f998608c437463371f0ff7f49a19a17a114d0" + +[[packages.wheels]] +name = "mdit_py_plugins-0.6.1-py3-none-any.whl" +upload-time = 2026-05-13 09:03:37.760000+00:00 +url = "https://files.pythonhosted.org/packages/a5/69/6da5581c6a7fede7dc261bf4e67d6adca4196f176b43288b55b3db395b6e/mdit_py_plugins-0.6.1-py3-none-any.whl" +size = 66663 + +[packages.wheels.hashes] +sha256 = "214c82fb2ac524472ab6a5bcab1de80f73b50443e187f401bfd77efbc7c6481d" + +[[packages]] +name = "mdurl" +version = "0.1.2" +marker = "\"pkg-meta\" in dependency_groups or \"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "mdurl-0.1.2.tar.gz" +upload-time = 2022-08-14 12:40:10.846281+00:00 +url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz" +size = 8729 + +[packages.sdist.hashes] +sha256 = "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + +[[packages.wheels]] +name = "mdurl-0.1.2-py3-none-any.whl" +upload-time = 2022-08-14 12:40:09.779676+00:00 +url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl" +size = 9979 + +[packages.wheels.hashes] +sha256 = "84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8" + +[[packages]] +name = "more-itertools" +version = "11.2.1" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.11" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "more_itertools-11.2.1.tar.gz" +upload-time = 2026-10-14 18:50:30.407709+00:00 +url = "https://files.pythonhosted.org/packages/52/b8/c63995bebbb9ac9c059350e0fb8c82c2420c85aeca7d34e40aecf3df9281/more_itertools-11.2.1.tar.gz" +size = 154133 + +[packages.sdist.hashes] +sha256 = "cbf08fd0af284dc69718b9b76a8e6203df624d70209ea511e4219d350c856f63" + +[[packages.wheels]] +name = "more_itertools-11.2.1-py3-none-any.whl" +upload-time = 2026-10-14 18:50:29.116732+00:00 +url = "https://files.pythonhosted.org/packages/5d/57/3c4b1c6f2e0cc29ba023802458ea3d2a996f87085559e4a5f2192d549532/more_itertools-11.2.1-py3-none-any.whl" +size = 74405 + +[packages.wheels.hashes] +sha256 = "35a7377edd1dd6608dcb2cdf534ded55ea32d49448875ad042cd3f879fb1ded0" + +[[packages]] +name = "nh3" +version = "0.3.7" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.8" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "nh3-0.3.7.tar.gz" +upload-time = 2026-08-23 14:26:30.728660+00:00 +url = "https://files.pythonhosted.org/packages/18/2f/022b27146d52d24b1b353b003359134788ecbcd6fcdf6283adbd57c0fbc8/nh3-0.3.7.tar.gz" +size = 25662 + +[packages.sdist.hashes] +sha256 = "71860d01c16f4d8c72e334e0674beb2b0899dbd0bf760de18932ef4390303848" + +[[packages.wheels]] +name = "nh3-0.3.7-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl" +upload-time = 2026-08-23 14:26:09.025294+00:00 +url = "https://files.pythonhosted.org/packages/94/0d/c257754bf57f829f307aa226bbe136d3a1356b5a0d08324c7b6bd2a8aacd/nh3-0.3.7-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl" +size = 1493959 + +[packages.wheels.hashes] +sha256 = "6c3aa50eb26e9228238271db9f983cbc3b006dfbfeca2d4dc34c33ddc6ac5ea5" + +[[packages.wheels]] +name = "nh3-0.3.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" +upload-time = 2026-08-23 14:26:17.272038+00:00 +url = "https://files.pythonhosted.org/packages/a6/ed/c5510c615dce55b6fcc364aa1838142f938beed64f5e4927490dfcaf4405/nh3-0.3.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" +size = 832161 + +[packages.wheels.hashes] +sha256 = "70f5ac8626e899a4bab0ef74ca2f5bd602f49c7b739e6e5026b4afc6d63dac42" + +[[packages.wheels]] +name = "nh3-0.3.7-cp38-abi3-win_amd64.whl" +upload-time = 2026-08-23 14:26:28.294566+00:00 +url = "https://files.pythonhosted.org/packages/b4/b9/34433ccb1f0fe6968dabbb7d4bf5721c6221878ef07832748c06655a6a80/nh3-0.3.7-cp38-abi3-win_amd64.whl" +size = 644462 + +[packages.wheels.hashes] +sha256 = "618e3059caf41ccdf5dcccb3fa9df4cf6e4efe23d1382a8bbfca272a8a4f8bfc" + +[[packages]] +name = "packageurl-python" +version = "0.17.6" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.8" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "packageurl_python-0.17.6.tar.gz" +upload-time = 2025-11-24 15:20:17.998933+00:00 +url = "https://files.pythonhosted.org/packages/f5/d6/3b5a4e3cfaef7a53869a26ceb034d1ff5e5c27c814ce77260a96d50ab7bb/packageurl_python-0.17.6.tar.gz" +size = 50618 + +[packages.sdist.hashes] +sha256 = "1252ce3a102372ca6f86eb968e16f9014c4ba511c5c37d95a7f023e2ca6e5c25" + +[[packages.wheels]] +name = "packageurl_python-0.17.6-py3-none-any.whl" +upload-time = 2025-11-24 15:20:16.962118+00:00 +url = "https://files.pythonhosted.org/packages/b1/2f/c7277b7615a93f51b5fbc1eacfc1b75e8103370e786fd8ce2abf6e5c04ab/packageurl_python-0.17.6-py3-none-any.whl" +size = 36776 + +[packages.wheels.hashes] +sha256 = "31a85c2717bc41dd818f3c62908685ff9eebcb68588213745b14a6ee9e7df7c9" + +[[packages]] +name = "packaging" +version = "26.3" +marker = "\"build\" in dependency_groups or \"pkg-meta\" in dependency_groups or \"project-runtime\" in dependency_groups or \"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups or \"test\" in dependency_groups or \"type\" in dependency_groups" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "packaging-26.3.tar.gz" +upload-time = 2026-08-04 18:15:28.737071+00:00 +url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz" +size = 313412 + +[packages.sdist.hashes] +sha256 = "94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79" + +[[packages.wheels]] +name = "packaging-26.3-py3-none-any.whl" +upload-time = 2026-08-04 18:15:27.159957+00:00 +url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl" +size = 129956 + +[packages.wheels.hashes] +sha256 = "d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c" + +[[packages]] +name = "pathspec" +version = "1.1.1" +marker = "\"build\" in dependency_groups or \"project-runtime\" in dependency_groups" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pathspec-1.1.1.tar.gz" +upload-time = 2026-04-27 01:46:08.907631+00:00 +url = "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz" +size = 135180 + +[packages.sdist.hashes] +sha256 = "17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a" + +[[packages.wheels]] +name = "pathspec-1.1.1-py3-none-any.whl" +upload-time = 2026-04-27 01:46:07.060850+00:00 +url = "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl" +size = 57328 + +[packages.wheels.hashes] +sha256 = "a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189" + +[[packages]] +name = "pluggy" +version = "1.7.0" +marker = "\"build\" in dependency_groups or \"project-runtime\" in dependency_groups or \"test\" in dependency_groups or \"type\" in dependency_groups" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pluggy-1.7.0.tar.gz" +upload-time = 2026-10-15 09:50:58.343484+00:00 +url = "https://files.pythonhosted.org/packages/bf/db/7fc19e6f2dc92a966727031389fc2e08b558f0f25eb7403c1119ad4713cd/pluggy-1.7.0.tar.gz" +size = 123304 + +[packages.sdist.hashes] +sha256 = "d1eaa46ebb595891b860ab086b4d09c8588af65ebd4361b8e8f4bb8920b90ba8" + +[[packages.wheels]] +name = "pluggy-1.7.0-py3-none-any.whl" +upload-time = 2026-10-15 09:50:56.808462+00:00 +url = "https://files.pythonhosted.org/packages/40/9e/2b38731e0fc536806f16490e1a12d7f0dc2a1235aa8cc07bcc75416a7daa/pluggy-1.7.0-py3-none-any.whl" +size = 27082 + +[packages.wheels.hashes] +sha256 = "7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec" + +[[packages]] +name = "ply" +version = "3.11" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "ply-3.11.tar.gz" +upload-time = 2018-02-15 19:01:31.097641+00:00 +url = "https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz" +size = 159130 + +[packages.sdist.hashes] +sha256 = "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + +[[packages.wheels]] +name = "ply-3.11-py2.py3-none-any.whl" +upload-time = 2018-02-15 19:01:27.172483+00:00 +url = "https://files.pythonhosted.org/packages/a3/58/35da89ee790598a0700ea49b2a66594140f44dec458c07e8e3d4979137fc/ply-3.11-py2.py3-none-any.whl" +size = 49567 + +[packages.wheels.hashes] +sha256 = "096f9b8350b65ebd2fd1346b12452efe5b9607f7482813ffca50c22722a807ce" + +[[packages]] +name = "prek" +version = "0.5.9" +marker = "\"release\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.8" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "prek-0.5.9.tar.gz" +upload-time = 2026-10-30 10:32:01.272337+00:00 +url = "https://files.pythonhosted.org/packages/f2/c6/89312171d4b87b7d2419a077f84e638bee69d1b7943598c72685655f86a7/prek-0.5.9.tar.gz" +size = 603716 + +[packages.sdist.hashes] +sha256 = "47bc660a7e959860a44afb5ff3dc167d96f04d929b405020a0f2c7683d3d00d8" + +[[packages.wheels]] +name = "prek-0.5.9-py3-none-macosx_11_0_arm64.whl" +upload-time = 2026-10-30 10:31:46.060256+00:00 +url = "https://files.pythonhosted.org/packages/5d/17/cef855f5a9c40d588557bf7a703bce0420d9592fa8407d2320df9a48135a/prek-0.5.9-py3-none-macosx_11_0_arm64.whl" +size = 5511607 + +[packages.wheels.hashes] +sha256 = "db03274472abdc033fce78ff28d6abe221eebd2388f0c6d293376b1b09df0978" + +[[packages.wheels]] +name = "prek-0.5.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" +upload-time = 2026-10-30 10:31:52.132595+00:00 +url = "https://files.pythonhosted.org/packages/7c/de/9f538470c56f0524215d5ede21fdb092b5a5a55ee8b4ccc88a35487d57e0/prek-0.5.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" +size = 5942047 + +[packages.wheels.hashes] +sha256 = "1ef04fd7b4bae3a31e1180bc87e877a3a5584063fe79320a125267afee47090d" + +[[packages.wheels]] +name = "prek-0.5.9-py3-none-win_amd64.whl" +upload-time = 2026-10-30 10:31:57.930703+00:00 +url = "https://files.pythonhosted.org/packages/cf/1e/2c35ff3b059b6fbb43273c3ebe996b6d9d37c1889607c5ba6b9eea66530c/prek-0.5.9-py3-none-win_amd64.whl" +size = 5501419 + +[packages.wheels.hashes] +sha256 = "b8fe1a01273203932b46318ebf304304838b6b73ff99b89531f42c86b63b86d5" + +[[packages]] +name = "py-serializable" +version = "2.1.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = "<4.0,>=3.8" +dependencies = [ + { name = "defusedxml" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "py_serializable-2.1.0.tar.gz" +upload-time = 2025-07-21 09:56:48.070686+00:00 +url = "https://files.pythonhosted.org/packages/73/21/d250cfca8ff30c2e5a7447bc13861541126ce9bd4426cd5d0c9f08b5547d/py_serializable-2.1.0.tar.gz" +size = 52368 + +[packages.sdist.hashes] +sha256 = "9d5db56154a867a9b897c0163b33a793c804c80cee984116d02d49e4578fc103" + +[[packages.wheels]] +name = "py_serializable-2.1.0-py3-none-any.whl" +upload-time = 2025-07-21 09:56:46.848289+00:00 +url = "https://files.pythonhosted.org/packages/9b/bf/7595e817906a29453ba4d99394e781b6fabe55d21f3c15d240f85dd06bb1/py_serializable-2.1.0-py3-none-any.whl" +size = 23045 + +[packages.wheels.hashes] +sha256 = "b56d5d686b5a03ba4f4db5e769dc32336e142fc3bd4d68a8c25579ebb0a67304" + +[[packages]] +name = "pycparser" +version = "3.12" +marker = "\"pkg-meta\" in dependency_groups and sys_platform == \"linux\"" +requires-python = ">=3.11" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pycparser-3.12.tar.gz" +upload-time = 2026-10-22 13:40:03.560254+00:00 +url = "https://files.pythonhosted.org/packages/cb/27/eeb9f307bf07060f3d9f9aa0fb8c15b01bdfded0a941e4b2719c7f94cacd/pycparser-3.12.tar.gz" +size = 158785 + +[packages.sdist.hashes] +sha256 = "f03387877eab82ce01bbdfd0ba7252ee55a90b1c708d5129e2ce915475cf1db6" + +[[packages.wheels]] +name = "pycparser-3.12-py3-none-any.whl" +upload-time = 2026-10-22 13:40:02.021539+00:00 +url = "https://files.pythonhosted.org/packages/b6/ae/315bbeee126a769cbde43cf4908acb4b40408d8bf8bbf334dd7368d8dadf/pycparser-3.12-py3-none-any.whl" +size = 62600 + +[packages.wheels.hashes] +sha256 = "a076f3f489b39b43ed13563a1dafe42447445bec2e294154ec5c57fcdda4c85e" + +[[packages]] +name = "pydantic" +version = "2.14.2" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "annotated-types" }, + { name = "pydantic-core" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pydantic-2.14.2.tar.gz" +upload-time = 2026-10-29 16:37:12.476407+00:00 +url = "https://files.pythonhosted.org/packages/9f/d5/b4867fa7c7f04c34997d7d8aad744f64d210bb99d67cf18bf3fb1eea1aed/pydantic-2.14.2.tar.gz" +size = 911596 + +[packages.sdist.hashes] +sha256 = "fb7b2db6cefe8414dd612edeede49c4c433acb0432b0f92b95024e45f66c505d" + +[[packages.wheels]] +name = "pydantic-2.14.2-py3-none-any.whl" +upload-time = 2026-10-29 16:37:10.181777+00:00 +url = "https://files.pythonhosted.org/packages/97/01/c71a71258b58659c72504e5fd65b451f6e36e34dc931d0b237ded213c814/pydantic-2.14.2-py3-none-any.whl" +size = 490403 + +[packages.wheels.hashes] +sha256 = "7efbf7507b937931cd32a5755acb00ea1cf5ccb1d4e8067a5850d5069e382118" + +[[packages]] +name = "pydantic-core" +version = "2.50.2" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "typing-extensions" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pydantic_core-2.50.2.tar.gz" +upload-time = 2026-10-29 16:34:57.465908+00:00 +url = "https://files.pythonhosted.org/packages/af/8e/23ec1021834e35041fbb2f10946141e6acdfd39379c45cc4d65a4e8a1d98/pydantic_core-2.50.2.tar.gz" +size = 518711 + +[packages.sdist.hashes] +sha256 = "1b0e8dc3932cf4e9ed5727570325cacc716b9409ffc794a221c0ccc72e8eb775" + +[[packages.wheels]] +name = "pydantic_core-2.50.2-cp315-cp315-macosx_11_0_arm64.whl" +upload-time = 2026-10-29 16:33:44.946711+00:00 +url = "https://files.pythonhosted.org/packages/ae/ff/af99a09eddc348c1d0744c0df28dfcd4839ca497067f0fa2168208b41b1b/pydantic_core-2.50.2-cp315-cp315-macosx_11_0_arm64.whl" +size = 2100409 + +[packages.wheels.hashes] +sha256 = "f73930dacad5e611fe019e18df6f53c30629b1843d038d303b8dec86a32493bd" + +[[packages.wheels]] +name = "pydantic_core-2.50.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +upload-time = 2026-10-29 16:33:53.333286+00:00 +url = "https://files.pythonhosted.org/packages/e6/d0/dd0e355694094f0045922f4da60ac9bc7a314babc494e46089fb00640fd3/pydantic_core-2.50.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +size = 2249999 + +[packages.wheels.hashes] +sha256 = "5299296ff5cafcb69851fd652de8f9268a0bb036bcbedbfcaa94cf743baf3986" + +[[packages.wheels]] +name = "pydantic_core-2.50.2-cp315-cp315-win_amd64.whl" +upload-time = 2026-10-29 16:34:01.773818+00:00 +url = "https://files.pythonhosted.org/packages/24/6b/702adc91486fb96ba55675d58ee15ddc38fb48553fb35e26fd005e303206/pydantic_core-2.50.2-cp315-cp315-win_amd64.whl" +size = 2261064 + +[packages.wheels.hashes] +sha256 = "04cf672960b8c4fc28bb159c8cdd101fbd311c520237a5c0360448b851adfb41" + +[[packages]] +name = "pygments" +version = "2.21.0" +marker = "\"pkg-meta\" in dependency_groups or \"test\" in dependency_groups or \"type\" in dependency_groups" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pygments-2.21.0.tar.gz" +upload-time = 2026-08-17 08:02:48.824391+00:00 +url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz" +size = 5005329 + +[packages.sdist.hashes] +sha256 = "610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c" + +[[packages.wheels]] +name = "pygments-2.21.0-py3-none-any.whl" +upload-time = 2026-08-17 08:02:44.912148+00:00 +url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl" +size = 1250147 + +[packages.wheels.hashes] +sha256 = "2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9" + +[[packages]] +name = "pyparsing" +version = "3.3.3" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pyparsing-3.3.3.tar.gz" +upload-time = 2026-09-20 20:59:05.609622+00:00 +url = "https://files.pythonhosted.org/packages/e4/11/b213bebff182584360cb8d17c72c1677fec5c5c228de439e63bcf8ab1c8f/pyparsing-3.3.3.tar.gz" +size = 1050487 + +[packages.sdist.hashes] +sha256 = "928ae7e20211f3b6f3915a72f06a0cfd29ab9d24279dd6346b6b1a7146397d36" + +[[packages.wheels]] +name = "pyparsing-3.3.3-py3-none-any.whl" +upload-time = 2026-09-20 20:59:04.025856+00:00 +url = "https://files.pythonhosted.org/packages/38/bb/d215ee7c73b61497b28a5503f9f53523f294fcc936762b7caf90e0c1c2b5/pyparsing-3.3.3-py3-none-any.whl" +size = 126420 + +[packages.wheels.hashes] +sha256 = "ece8c00a69cf01b45d0b1dedabb469c90d8caf996d4fda40f147627a122849a4" + +[[packages]] +name = "pytest" +version = "9.2.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "colorama" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pytest-9.2.0.tar.gz" +upload-time = 2026-10-27 21:30:20.728655+00:00 +url = "https://files.pythonhosted.org/packages/79/42/bb4641652e58dedeac2ec51abc1f8cae4fee4ec63899a0999016229a0f2a/pytest-9.2.0.tar.gz" +size = 1797555 + +[packages.sdist.hashes] +sha256 = "97c4f3b1f3c7414aa36465e09b8220f1d03627993bd51b1282e193753c80557b" + +[[packages.wheels]] +name = "pytest-9.2.0-py3-none-any.whl" +upload-time = 2026-10-27 21:30:19.131148+00:00 +url = "https://files.pythonhosted.org/packages/51/39/1f5d8c8877a0fa327db959c19341d4be61660de1ab6b7391f9eb805bcd67/pytest-9.2.0-py3-none-any.whl" +size = 411776 + +[packages.wheels.hashes] +sha256 = "07acdcf88ec174f907dc01af70bf52d49b014bbab03faeeade31c96b18c2e588" + +[[packages]] +name = "pytest-cov" +version = "7.1.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups" +requires-python = ">=3.9" +dependencies = [ + { name = "coverage" }, + { name = "pluggy" }, + { name = "pytest" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pytest_cov-7.1.0.tar.gz" +upload-time = 2026-03-21 20:11:16.284275+00:00 +url = "https://files.pythonhosted.org/packages/b1/51/a849f96e117386044471c8ec2bd6cfebacda285da9525c9106aeb28da671/pytest_cov-7.1.0.tar.gz" +size = 55592 + +[packages.sdist.hashes] +sha256 = "30674f2b5f6351aa09702a9c8c364f6a01c27aae0c1366ae8016160d1efc56b2" + +[[packages.wheels]] +name = "pytest_cov-7.1.0-py3-none-any.whl" +upload-time = 2026-03-21 20:11:14.438324+00:00 +url = "https://files.pythonhosted.org/packages/9d/7a/d968e294073affff457b041c2be9868a40c1c71f4a35fcc1e45e5493067b/pytest_cov-7.1.0-py3-none-any.whl" +size = 22876 + +[packages.wheels.hashes] +sha256 = "a0461110b7865f9a271aa1b51e516c9a95de9d696734a2f71e3e78f46e1d4678" + +[[packages]] +name = "pytest-mock" +version = "3.17.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "pytest" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pytest_mock-3.17.0.tar.gz" +upload-time = 2026-10-17 16:21:42.435701+00:00 +url = "https://files.pythonhosted.org/packages/97/c2/28b9f5b955ff2bcd4727a6f768e2ca9b586cd7c37b95ea5f7b9b873ac7b3/pytest_mock-3.17.0.tar.gz" +size = 43064 + +[packages.sdist.hashes] +sha256 = "e36576e0985e01027e999891e7a966c67822d40c89ef1b4c8b6e22737e3590b4" + +[[packages.wheels]] +name = "pytest_mock-3.17.0-py3-none-any.whl" +upload-time = 2026-10-17 16:21:41.265482+00:00 +url = "https://files.pythonhosted.org/packages/e8/ea/47fbdc8f37410956fd445720e927589b1e2a47772c5f28109f0ce2fa26d9/pytest_mock-3.17.0-py3-none-any.whl" +size = 11248 + +[packages.wheels.hashes] +sha256 = "1b82aa4b37137248bd687055e109723debeb07b489de1565297dc9589c5f2d6b" + +[[packages]] +name = "python-dateutil" +version = "3.0.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +dependencies = [ + { name = "six" }, + { name = "tzdata" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "python_dateutil-3.0.0.tar.gz" +upload-time = 2026-10-21 23:41:45.075347+00:00 +url = "https://files.pythonhosted.org/packages/0e/df/f15f80383f152452d8985b36d95cb8751f901a3e0ff4cd27f7e118f168e2/python_dateutil-3.0.0.tar.gz" +size = 271066 + +[packages.sdist.hashes] +sha256 = "7ebcb3c29a92f3ceafe79a7a48a5c45677e9e004bbeec5742ac0bbb00560b7a2" + +[[packages.wheels]] +name = "python_dateutil-3.0.0-py2.py3-none-any.whl" +upload-time = 2026-10-21 23:41:43.431814+00:00 +url = "https://files.pythonhosted.org/packages/5a/17/cebee01d1c0c1441174cf0456ddc91b280d79acb65340c05e41d77866ee8/python_dateutil-3.0.0-py2.py3-none-any.whl" +size = 94659 + +[packages.wheels.hashes] +sha256 = "3c79630202e4152c6add678446984236efe4f57e84d8e892aab0637bab82e9fd" + +[[packages]] +name = "pywin32-ctypes" +version = "0.2.3" +marker = "\"pkg-meta\" in dependency_groups and sys_platform == \"win32\"" +requires-python = ">=3.6" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pywin32-ctypes-0.2.3.tar.gz" +upload-time = 2024-08-14 10:15:34.626878+00:00 +url = "https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz" +size = 29471 + +[packages.sdist.hashes] +sha256 = "d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755" + +[[packages.wheels]] +name = "pywin32_ctypes-0.2.3-py3-none-any.whl" +upload-time = 2024-08-14 10:15:33.187242+00:00 +url = "https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl" +size = 30756 + +[packages.wheels.hashes] +sha256 = "8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8" + +[[packages]] +name = "pyyaml" +version = "6.0.3" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.8" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "pyyaml-6.0.3.tar.gz" +upload-time = 2025-09-25 21:33:16.546886+00:00 +url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz" +size = 130960 + +[packages.sdist.hashes] +sha256 = "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" + +[[packages]] +name = "rdflib" +version = "7.6.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.8.1" +dependencies = [ + { name = "pyparsing" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "rdflib-7.6.0.tar.gz" +upload-time = 2026-02-13 07:15:55.938955+00:00 +url = "https://files.pythonhosted.org/packages/98/f5/18bb77b7af9526add0c727a3b2048959847dc5fb030913e2918bf384fec3/rdflib-7.6.0.tar.gz" +size = 4943826 + +[packages.sdist.hashes] +sha256 = "6c831288d5e4a5a7ece85d0ccde9877d512a3d0f02d7c06455d00d6d0ea379df" + +[[packages.wheels]] +name = "rdflib-7.6.0-py3-none-any.whl" +upload-time = 2026-02-13 07:15:46.487762+00:00 +url = "https://files.pythonhosted.org/packages/10/c2/6604a71269e0c1bd75656d5a001432d16f2cc5b8c057140ec797155c295e/rdflib-7.6.0-py3-none-any.whl" +size = 615416 + +[packages.wheels.hashes] +sha256 = "30c0a3ebf4c0e09215f066be7246794b6492e054e782d7ac2a34c9f70a15e0dd" + +[[packages]] +name = "readme-renderer" +version = "46.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "docutils" }, + { name = "nh3" }, + { name = "pygments" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "readme_renderer-46.0.tar.gz" +upload-time = 2026-08-28 15:18:32.490778+00:00 +url = "https://files.pythonhosted.org/packages/25/d7/9309494fad74ee831d4546f69325b5519f37c6dfb2d9ba495db8c6d4f4ca/readme_renderer-46.0.tar.gz" +size = 38382 + +[packages.sdist.hashes] +sha256 = "af3e964914f6310a33ff67b72a4bdd940bed8d7c3bdecd2d14f40edf284bfe90" + +[[packages.wheels]] +name = "readme_renderer-46.0-py3-none-any.whl" +upload-time = 2026-08-28 15:18:31.132970+00:00 +url = "https://files.pythonhosted.org/packages/4b/72/ac5ca81fe9121fcaa9d828d21017cba00a16a98e4ea5fb60c878f93dda4f/readme_renderer-46.0-py3-none-any.whl" +size = 14239 + +[packages.wheels.hashes] +sha256 = "d0dae1f74bb273b534770cb4cccb6bb78735540afdb03c2146f4e19dcd412560" + +[[packages]] +name = "referencing" +version = "0.37.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.10" +dependencies = [ + { name = "attrs" }, + { name = "rpds-py" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "referencing-0.37.0.tar.gz" +upload-time = 2025-10-13 15:30:48.871335+00:00 +url = "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz" +size = 78036 + +[packages.sdist.hashes] +sha256 = "44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" + +[[packages.wheels]] +name = "referencing-0.37.0-py3-none-any.whl" +upload-time = 2025-10-13 15:30:47.625937+00:00 +url = "https://files.pythonhosted.org/packages/2c/58/ca301544e1fa93ed4f80d724bf5b194f6e4b945841c5bfd555878eea9fcb/referencing-0.37.0-py3-none-any.whl" +size = 26766 + +[packages.wheels.hashes] +sha256 = "381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231" + +[[packages]] +name = "release-creator" +version = "4.4.0" +marker = "\"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.15" +dependencies = [ + { name = "docutils" }, + { name = "markdown-it-py" }, + { name = "mdformat" }, + { name = "mdformat-gfm" }, + { name = "packaging" }, + { name = "towncrier" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "release_creator-4.4.0.tar.gz" +upload-time = 2026-11-02 21:44:48.475063+00:00 +url = "https://files.pythonhosted.org/packages/d8/cf/8f376cc925c26fa5434d327ba03f4ed709b80d2077edda865fc3b2fe1940/release_creator-4.4.0.tar.gz" +size = 171450 + +[packages.sdist.hashes] +sha256 = "263d518ddee6371fa13d25bd07f7b5af0fa7a6e421b16f1e8143b0a9443bc84d" + +[[packages.wheels]] +name = "release_creator-4.4.0-py3-none-any.whl" +upload-time = 2026-11-02 21:44:47.195366+00:00 +url = "https://files.pythonhosted.org/packages/7b/29/6f2a3158b082b3bf8a94eb93662d80b4db4212abea0fc1fae07ac9a043da/release_creator-4.4.0-py3-none-any.whl" +size = 54784 + +[packages.wheels.hashes] +sha256 = "560ed208cca0dc53bc227878e5596e3e26e44fa277658c5d0dc662901d95f8cb" + +[[packages]] +name = "requests" +version = "2.34.2" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "requests-2.34.2.tar.gz" +upload-time = 2026-05-14 19:25:27.735762+00:00 +url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz" +size = 142856 + +[packages.sdist.hashes] +sha256 = "f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed" + +[[packages.wheels]] +name = "requests-2.34.2-py3-none-any.whl" +upload-time = 2026-05-14 19:25:26.443000+00:00 +url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl" +size = 73075 + +[packages.wheels.hashes] +sha256 = "2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0" + +[[packages]] +name = "requests-toolbelt" +version = "1.0.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" +dependencies = [ + { name = "requests" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "requests-toolbelt-1.0.0.tar.gz" +upload-time = 2023-05-01 04:11:33.229998+00:00 +url = "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz" +size = 206888 + +[packages.sdist.hashes] +sha256 = "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6" + +[[packages.wheels]] +name = "requests_toolbelt-1.0.0-py2.py3-none-any.whl" +upload-time = 2023-05-01 04:11:28.427086+00:00 +url = "https://files.pythonhosted.org/packages/3f/51/d4db610ef29373b879047326cbf6fa98b6c1969d6f6dc423279de2b1be2c/requests_toolbelt-1.0.0-py2.py3-none-any.whl" +size = 54481 + +[packages.wheels.hashes] +sha256 = "cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06" + +[[packages]] +name = "rfc3339-validator" +version = "0.1.4" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +dependencies = [ + { name = "six" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "rfc3339_validator-0.1.4.tar.gz" +upload-time = 2021-05-12 16:37:54.178122+00:00 +url = "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz" +size = 5513 + +[packages.sdist.hashes] +sha256 = "138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b" + +[[packages.wheels]] +name = "rfc3339_validator-0.1.4-py2.py3-none-any.whl" +upload-time = 2021-05-12 16:37:52.536885+00:00 +url = "https://files.pythonhosted.org/packages/7b/44/4e421b96b67b2daff264473f7465db72fbdf36a07e05494f50300cc7b0c6/rfc3339_validator-0.1.4-py2.py3-none-any.whl" +size = 3490 + +[packages.wheels.hashes] +sha256 = "24f6ec1eda14ef823da9e36ec7113124b39c04d50a4d3d3a3c2859577e7791fa" + +[[packages]] +name = "rfc3986" +version = "2.0.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "rfc3986-2.0.0.tar.gz" +upload-time = 2022-01-10 00:52:30.832978+00:00 +url = "https://files.pythonhosted.org/packages/85/40/1520d68bfa07ab5a6f065a186815fb6610c86fe957bc065754e47f7b0840/rfc3986-2.0.0.tar.gz" +size = 49026 + +[packages.sdist.hashes] +sha256 = "97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" + +[[packages.wheels]] +name = "rfc3986-2.0.0-py2.py3-none-any.whl" +upload-time = 2022-01-10 00:52:29.594625+00:00 +url = "https://files.pythonhosted.org/packages/ff/9a/9afaade874b2fa6c752c36f1548f718b5b83af81ed9b76628329dab81c1b/rfc3986-2.0.0-py2.py3-none-any.whl" +size = 31326 + +[packages.wheels.hashes] +sha256 = "50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd" + +[[packages]] +name = "rfc3986-validator" +version = "0.1.1" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "rfc3986_validator-0.1.1.tar.gz" +upload-time = 2019-10-28 16:00:19.144483+00:00 +url = "https://files.pythonhosted.org/packages/da/88/f270de456dd7d11dcc808abfa291ecdd3f45ff44e3b549ffa01b126464d0/rfc3986_validator-0.1.1.tar.gz" +size = 6760 + +[packages.sdist.hashes] +sha256 = "3d44bde7921b3b9ec3ae4e3adca370438eccebc676456449b145d533b240d055" + +[[packages.wheels]] +name = "rfc3986_validator-0.1.1-py2.py3-none-any.whl" +upload-time = 2019-10-28 16:00:13.976195+00:00 +url = "https://files.pythonhosted.org/packages/9e/51/17023c0f8f1869d8806b979a2bffa3f861f26a3f1a66b094288323fba52f/rfc3986_validator-0.1.1-py2.py3-none-any.whl" +size = 4242 + +[packages.wheels.hashes] +sha256 = "2f235c432ef459970b4306369336b9d5dbdda31b510ca1e327636e01f528bfa9" + +[[packages]] +name = "rfc3987-syntax" +version = "1.1.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.9" +dependencies = [ + { name = "lark" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "rfc3987_syntax-1.1.0.tar.gz" +upload-time = 2025-07-18 01:05:05.015375+00:00 +url = "https://files.pythonhosted.org/packages/2c/06/37c1a5557acf449e8e406a830a05bf885ac47d33270aec454ef78675008d/rfc3987_syntax-1.1.0.tar.gz" +size = 14239 + +[packages.sdist.hashes] +sha256 = "717a62cbf33cffdd16dfa3a497d81ce48a660ea691b1ddd7be710c22f00b4a0d" + +[[packages.wheels]] +name = "rfc3987_syntax-1.1.0-py3-none-any.whl" +upload-time = 2025-07-18 01:05:03.843605+00:00 +url = "https://files.pythonhosted.org/packages/7e/71/44ce230e1b7fadd372515a97e32a83011f906ddded8d03e3c6aafbdedbb7/rfc3987_syntax-1.1.0-py3-none-any.whl" +size = 8046 + +[packages.wheels.hashes] +sha256 = "6c3d97604e4c5ce9f714898e05401a0445a641cfa276432b0a648c80856f6a3f" + +[[packages]] +name = "rich" +version = "15.0.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.9.0" +dependencies = [ + { name = "markdown-it-py" }, + { name = "pygments" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "rich-15.0.0.tar.gz" +upload-time = 2026-04-12 08:24:00.750018+00:00 +url = "https://files.pythonhosted.org/packages/c0/8f/0722ca900cc807c13a6a0c696dacf35430f72e0ec571c4275d2371fca3e9/rich-15.0.0.tar.gz" +size = 230680 + +[packages.sdist.hashes] +sha256 = "edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36" + +[[packages.wheels]] +name = "rich-15.0.0-py3-none-any.whl" +upload-time = 2026-04-12 08:24:02.830783+00:00 +url = "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl" +size = 310654 + +[packages.wheels.hashes] +sha256 = "33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb" + +[[packages]] +name = "rpds-py" +version = "2026.9.1" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.11" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "rpds_py-2026.9.1.tar.gz" +upload-time = 2026-10-04 16:32:36.469775+00:00 +url = "https://files.pythonhosted.org/packages/42/68/3bd46b8a5e01d3c2ebdf9c5e9497912e3fe0cde02bac21a7130ca866e403/rpds_py-2026.9.1.tar.gz" +size = 63948 + +[packages.sdist.hashes] +sha256 = "4793ef7f78268b124b73fa933440f01d258bbae01de9fa53e9080c9ab0425a12" + +[[packages.wheels]] +name = "rpds_py-2026.9.1-cp315-cp315-macosx_11_0_arm64.whl" +upload-time = 2026-10-04 16:30:49.872953+00:00 +url = "https://files.pythonhosted.org/packages/ae/3f/ad45d03df4f84ebae5439577ee81f3999d182711e82235c8037b6528890e/rpds_py-2026.9.1-cp315-cp315-macosx_11_0_arm64.whl" +size = 342051 + +[packages.wheels.hashes] +sha256 = "00ba2d8c7dd4ee537978ddf4b3fbd712bef2d8751603f7f3146b3f4287768e25" + +[[packages.wheels]] +name = "rpds_py-2026.9.1-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" +upload-time = 2026-10-04 16:30:58.295504+00:00 +url = "https://files.pythonhosted.org/packages/57/ca/e2e9a0a46a74ed51a0498ba1fe10f4ea6b2d9a155f372a2f91e51f18cf10/rpds_py-2026.9.1-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" +size = 372022 + +[packages.wheels.hashes] +sha256 = "2c16ab111bc27c646ba8aa005d0527754edc538ebb636f0b1bf8e244b48d1945" + +[[packages.wheels]] +name = "rpds_py-2026.9.1-cp315-cp315-win_amd64.whl" +upload-time = 2026-10-04 16:31:10.840084+00:00 +url = "https://files.pythonhosted.org/packages/6d/a5/71b5cd00e0521e3b6b81828baea368c62b6b700ebdd9554cd7d41ddf12fa/rpds_py-2026.9.1-cp315-cp315-win_amd64.whl" +size = 223121 + +[packages.wheels.hashes] +sha256 = "75c38c50ab9aca840225d9a9a3810bf11d04bd5c1f186cabbb8aee56db3e9b15" + +[[packages]] +name = "secretstorage" +version = "3.5.0" +marker = "\"pkg-meta\" in dependency_groups and sys_platform == \"linux\"" +requires-python = ">=3.10" +dependencies = [ + { name = "cryptography" }, + { name = "jeepney" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "secretstorage-3.5.0.tar.gz" +upload-time = 2025-11-23 19:02:53.191898+00:00 +url = "https://files.pythonhosted.org/packages/1c/03/e834bcd866f2f8a49a85eaff47340affa3bfa391ee9912a952a1faa68c7b/secretstorage-3.5.0.tar.gz" +size = 19884 + +[packages.sdist.hashes] +sha256 = "f04b8e4689cbce351744d5537bf6b1329c6fc68f91fa666f60a380edddcd11be" + +[[packages.wheels]] +name = "secretstorage-3.5.0-py3-none-any.whl" +upload-time = 2025-11-23 19:02:51.545472+00:00 +url = "https://files.pythonhosted.org/packages/b7/46/f5af3402b579fd5e11573ce652019a67074317e18c1935cc0b4ba9b35552/secretstorage-3.5.0-py3-none-any.whl" +size = 15554 + +[packages.wheels.hashes] +sha256 = "0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137" + +[[packages]] +name = "semantic-version" +version = "2.10.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=2.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "semantic_version-2.10.0.tar.gz" +upload-time = 2022-05-26 13:35:23.454764+00:00 +url = "https://files.pythonhosted.org/packages/7d/31/f2289ce78b9b473d582568c234e104d2a342fd658cc288a7553d83bb8595/semantic_version-2.10.0.tar.gz" +size = 52289 + +[packages.sdist.hashes] +sha256 = "bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c" + +[[packages.wheels]] +name = "semantic_version-2.10.0-py2.py3-none-any.whl" +upload-time = 2022-05-26 13:35:21.206388+00:00 +url = "https://files.pythonhosted.org/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl" +size = 15552 + +[packages.wheels.hashes] +sha256 = "de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177" + +[[packages]] +name = "setuptools" +version = "84.2.1" +marker = "\"build\" in dependency_groups" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "setuptools-84.2.1.tar.gz" +upload-time = 2026-10-20 19:01:37.742699+00:00 +url = "https://files.pythonhosted.org/packages/70/b3/c19426f783614d625699a4b247faf628ea9ab1db228674491767b417f9e1/setuptools-84.2.1.tar.gz" +size = 1230289 + +[packages.sdist.hashes] +sha256 = "3ff8b3b5492a0aa66960f4419365a86b84e013070d4313e4d4a6894f5d64d6bc" + +[[packages.wheels]] +name = "setuptools-84.2.1-py3-none-any.whl" +upload-time = 2026-10-20 19:01:35.678013+00:00 +url = "https://files.pythonhosted.org/packages/ef/55/6dc6d6bb953bdfc52519a0059592c52b6e3b8ad51cf8256dffceb55b0610/setuptools-84.2.1-py3-none-any.whl" +size = 876263 + +[packages.wheels.hashes] +sha256 = "ca140b45d5325a9478f880e351484f62fef15f336462e449ca0c03c873d589c2" + +[[packages]] +name = "setuptools-scm" +version = "10.3.4" +marker = "\"build\" in dependency_groups" +requires-python = ">=3.8" +dependencies = [ + { name = "packaging" }, + { name = "setuptools" }, + { name = "vcs-versioning" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "setuptools_scm-10.3.4.tar.gz" +upload-time = 2026-09-23 19:21:42.950372+00:00 +url = "https://files.pythonhosted.org/packages/85/d8/fc143f88819ccf10ba2388ba86732ee2de193e578234e25a783f6cc14bf7/setuptools_scm-10.3.4.tar.gz" +size = 78410 + +[packages.sdist.hashes] +sha256 = "a69f28bfc245608781205e912faae437c2b2165773afa4e7b979d77447a69dd2" + +[[packages.wheels]] +name = "setuptools_scm-10.3.4-py3-none-any.whl" +upload-time = 2026-09-23 19:21:41.607429+00:00 +url = "https://files.pythonhosted.org/packages/da/f5/54538a1f17ea753c42b0928dc2e62986d463f8c393340b9a1e602f2d4dd9/setuptools_scm-10.3.4-py3-none-any.whl" +size = 33366 + +[packages.wheels.hashes] +sha256 = "82f34c3e3084fc2b57d397200637cc13f2338004052d2fee47baa5f0e902464e" + +[[packages]] +name = "six" +version = "1.17.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "six-1.17.0.tar.gz" +upload-time = 2024-12-04 17:35:28.174320+00:00 +url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" +size = 34031 + +[packages.sdist.hashes] +sha256 = "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + +[[packages.wheels]] +name = "six-1.17.0-py2.py3-none-any.whl" +upload-time = 2024-12-04 17:35:26.475808+00:00 +url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl" +size = 11050 + +[packages.wheels.hashes] +sha256 = "4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274" + +[[packages]] +name = "sortedcontainers" +version = "2.4.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "sortedcontainers-2.4.0.tar.gz" +upload-time = 2021-05-16 22:03:42.897871+00:00 +url = "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz" +size = 30594 + +[packages.sdist.hashes] +sha256 = "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + +[[packages.wheels]] +name = "sortedcontainers-2.4.0-py2.py3-none-any.whl" +upload-time = 2021-05-16 22:03:41.177807+00:00 +url = "https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl" +size = 29575 + +[packages.wheels.hashes] +sha256 = "a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0" + +[[packages]] +name = "spdx-tools" +version = "0.8.5" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.10" +dependencies = [ + { name = "beartype" }, + { name = "click" }, + { name = "license-expression" }, + { name = "ply" }, + { name = "pyyaml" }, + { name = "rdflib" }, + { name = "semantic-version" }, + { name = "uritools" }, + { name = "xmltodict" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "spdx_tools-0.8.5.tar.gz" +upload-time = 2026-03-13 09:29:23.155398+00:00 +url = "https://files.pythonhosted.org/packages/2f/99/33383f587b59cbd191cc1c0fd5408e550b9275e0090d32561cbddc973fdc/spdx_tools-0.8.5.tar.gz" +size = 696323 + +[packages.sdist.hashes] +sha256 = "be600beb2f762f0116025e05490d399e724f668bef84025a7c421bb266688bdb" + +[[packages.wheels]] +name = "spdx_tools-0.8.5-py3-none-any.whl" +upload-time = 2026-03-13 09:29:20.907842+00:00 +url = "https://files.pythonhosted.org/packages/88/f5/1ac402e1f8d253fa60ac167c4a1fb7eeb0f29a04942788e2d43c984cd749/spdx_tools-0.8.5-py3-none-any.whl" +size = 286573 + +[packages.wheels.hashes] +sha256 = "7c2d5865941be9d2e898f5b084e8d5422dd298dc5a29320ddb198fec304f59c4" + +[[packages]] +name = "tomlkit" +version = "0.15.2" +marker = "\"build\" in dependency_groups or \"project-runtime\" in dependency_groups" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "tomlkit-0.15.2.tar.gz" +upload-time = 2026-10-16 04:07:08.166827+00:00 +url = "https://files.pythonhosted.org/packages/08/72/fc01563df95c189a9f65850096bdc205bc2fe37da6c740cd64afaf18d07e/tomlkit-0.15.2.tar.gz" +size = 190522 + +[packages.sdist.hashes] +sha256 = "83e32755ba1d20d9340bd069ee97e9f6232ba2346b63ffcba425de01f7e327a6" + +[[packages.wheels]] +name = "tomlkit-0.15.2-py3-none-any.whl" +upload-time = 2026-10-16 04:07:09.216014+00:00 +url = "https://files.pythonhosted.org/packages/da/46/7d84138a60a8bd796825b2d38ebe92d0d16501ca57d501b7c5d677401bbc/tomlkit-0.15.2-py3-none-any.whl" +size = 52225 + +[packages.wheels.hashes] +sha256 = "05562412163a3037b94497385fb7f9204c637bc605af7a48199e41cf2272f437" + +[[packages]] +name = "towncrier" +version = "26.9.0" +marker = "\"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.9" +dependencies = [ + { name = "click" }, + { name = "jinja2" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "towncrier-26.9.0.tar.gz" +upload-time = 2026-09-04 12:57:25.341701+00:00 +url = "https://files.pythonhosted.org/packages/92/d4/e85ce614bf45b1a7fe13b82cc687819c2eaac5a1dd94b84834322095fd98/towncrier-26.9.0.tar.gz" +size = 79338 + +[packages.sdist.hashes] +sha256 = "ace9031631c718cc0709107b8755e6e31350eb8acdc877af43df3177addb9a55" + +[[packages.wheels]] +name = "towncrier-26.9.0-py3-none-any.whl" +upload-time = 2026-09-04 12:57:23.986160+00:00 +url = "https://files.pythonhosted.org/packages/82/88/f9340b545dafa64de053798e760515a2736fbb60092cf9aa6b146ccf3ede/towncrier-26.9.0-py3-none-any.whl" +size = 67030 + +[packages.wheels.hashes] +sha256 = "ae4d223e6aadaff98d29b7f09e58d9c9ccf4cd3b455a2d2e0486d432cd8bf660" + +[[packages]] +name = "trove-classifiers" +version = "2026.9.21.13" +marker = "\"build\" in dependency_groups or \"project-runtime\" in dependency_groups" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "trove_classifiers-2026.9.21.13.tar.gz" +upload-time = 2026-09-21 13:29:07.301512+00:00 +url = "https://files.pythonhosted.org/packages/bf/93/af436dfaa845cab5d96f0adbc1e4f3730532d37fa249e4eb796fb1d7fc82/trove_classifiers-2026.9.21.13.tar.gz" +size = 17085 + +[packages.sdist.hashes] +sha256 = "0a9ebc8d4e2f3e8a22848c5258033035bec17a3012ac3fea16dbaa764489eb71" + +[[packages.wheels]] +name = "trove_classifiers-2026.9.21.13-py3-none-any.whl" +upload-time = 2026-09-21 13:29:06.123578+00:00 +url = "https://files.pythonhosted.org/packages/30/81/0da8afb52a71d0a4f2bd3152357b1a441e393b286374802b9d3addab4ab5/trove_classifiers-2026.9.21.13-py3-none-any.whl" +size = 14232 + +[packages.wheels.hashes] +sha256 = "8b1ff4f9c191b1040b71c37f1e445ab99732911e3cd91de52838453a854d7a17" + +[[packages]] +name = "twine" +version = "7.0.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "id" }, + { name = "keyring" }, + { name = "packaging" }, + { name = "readme-renderer" }, + { name = "requests" }, + { name = "requests-toolbelt" }, + { name = "rfc3986" }, + { name = "rich" }, + { name = "urllib3" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "twine-7.0.0.tar.gz" +upload-time = 2026-07-27 15:59:00.825945+00:00 +url = "https://files.pythonhosted.org/packages/92/3c/58f808a359700f39a967dffede33efeac809262c03303fa3eec6afff8f49/twine-7.0.0.tar.gz" +size = 215032 + +[packages.sdist.hashes] +sha256 = "85cdb29c518efef867360ae4acd4b0dfd61c8654a22fca08e6f8539f05022177" + +[[packages.wheels]] +name = "twine-7.0.0-py3-none-any.whl" +upload-time = 2026-07-27 15:58:59.260418+00:00 +url = "https://files.pythonhosted.org/packages/96/08/ddcdc06225eaad6de0e48e1002b06d919dbde20582d0662c7af51308e5d6/twine-7.0.0-py3-none-any.whl" +size = 43204 + +[packages.wheels.hashes] +sha256 = "b854164df26db268af05f49aa5c0344b10e27a494343ff05b1e0bad3b135f5a7" + +[[packages]] +name = "ty" +version = "0.0.95" +marker = "\"type\" in dependency_groups" +requires-python = ">=3.8" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "ty-0.0.95.tar.gz" +upload-time = 2026-10-29 19:21:51.955948+00:00 +url = "https://files.pythonhosted.org/packages/39/08/d63954788578b9189dbf85081d8cbdba9a32a9a6a29729129a0da09cd3a0/ty-0.0.95.tar.gz" +size = 8115525 + +[packages.sdist.hashes] +sha256 = "a480853a74d43074b2d4b28025d406b9d7223f7fe9f3a6c2adec3eacdbf14ca0" + +[[packages.wheels]] +name = "ty-0.0.95-py3-none-macosx_11_0_arm64.whl" +upload-time = 2026-10-29 19:21:16.734602+00:00 +url = "https://files.pythonhosted.org/packages/dc/6b/2a084a72c8069f8496fcc0f576ec053f648b1baeed07532b3eb84c4982e4/ty-0.0.95-py3-none-macosx_11_0_arm64.whl" +size = 13144133 + +[packages.wheels.hashes] +sha256 = "3e7902477410e897a60d2cf29ca89c28ef2a2abdb81698d8ae4be2e33b934d4b" + +[[packages.wheels]] +name = "ty-0.0.95-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" +upload-time = 2026-10-29 19:21:30.801674+00:00 +url = "https://files.pythonhosted.org/packages/90/64/636308717989afa2fe765604ae2a76189f470d566e5e58da4482b625d64e/ty-0.0.95-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" +size = 16312046 + +[packages.wheels.hashes] +sha256 = "6d47be2db5db80cd70c582b240a71dd8e9be215ce9288298c863c7c3611ef02b" + +[[packages.wheels]] +name = "ty-0.0.95-py3-none-win_amd64.whl" +upload-time = 2026-10-29 19:21:47.462829+00:00 +url = "https://files.pythonhosted.org/packages/b2/df/46fdcc84de81159e1d40ca103d24ac08b2450a2a51a1572333e8e796b8fc/ty-0.0.95-py3-none-win_amd64.whl" +size = 14097073 + +[packages.wheels.hashes] +sha256 = "d07bd09f8a525759a595e04051e923aa54f8dc483f90e6a0b003d77a3fae0f04" + +[[packages]] +name = "typing-extensions" +version = "4.16.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "typing_extensions-4.16.0.tar.gz" +upload-time = 2026-07-02 08:40:05.920538+00:00 +url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz" +size = 113555 + +[packages.sdist.hashes] +sha256 = "dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5" + +[[packages.wheels]] +name = "typing_extensions-4.16.0-py3-none-any.whl" +upload-time = 2026-07-02 08:40:04.659120+00:00 +url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl" +size = 45571 + +[packages.wheels.hashes] +sha256 = "481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8" + +[[packages]] +name = "typing-inspection" +version = "0.4.4" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +dependencies = [ + { name = "typing-extensions" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "typing_inspection-0.4.4.tar.gz" +upload-time = 2026-08-12 12:37:25.997329+00:00 +url = "https://files.pythonhosted.org/packages/a3/26/b09b8010994eccc3c09092e6b34058f36a460eea2d4c3e8b910c695975a0/typing_inspection-0.4.4.tar.gz" +size = 76928 + +[packages.sdist.hashes] +sha256 = "547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47" + +[[packages.wheels]] +name = "typing_inspection-0.4.4-py3-none-any.whl" +upload-time = 2026-08-12 12:37:24.648475+00:00 +url = "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl" +size = 14750 + +[packages.wheels.hashes] +sha256 = "65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147" + +[[packages]] +name = "tzdata" +version = "2026.6" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=2" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "tzdata-2026.6.tar.gz" +upload-time = 2026-10-28 09:57:09.137703+00:00 +url = "https://files.pythonhosted.org/packages/7a/29/6a1391d31cd00ff9e927215a224a880e1e84e826b64ba80a499e51c074d8/tzdata-2026.6.tar.gz" +size = 201017 + +[packages.sdist.hashes] +sha256 = "85d2cd9c09f81f0bb29db27759fc83af4f1e620efb814f8c5bf8b4cc4feece6d" + +[[packages.wheels]] +name = "tzdata-2026.6-py2.py3-none-any.whl" +upload-time = 2026-10-28 09:57:07.276552+00:00 +url = "https://files.pythonhosted.org/packages/0a/66/9a06c2227fedfd4919f0eaaa8b94377d9730882a7e4f95823c9a331ab5e1/tzdata-2026.6-py2.py3-none-any.whl" +size = 348210 + +[packages.wheels.hashes] +sha256 = "0a10eec6e13ef16b627fabed9a5f2ba61a62b1c67f327305f4e7e412a70b4aec" + +[[packages]] +name = "uri-template" +version = "1.3.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.7" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "uri-template-1.3.0.tar.gz" +upload-time = 2023-06-21 01:49:05.374755+00:00 +url = "https://files.pythonhosted.org/packages/31/c7/0336f2bd0bcbada6ccef7aaa25e443c118a704f828a0620c6fa0207c1b64/uri-template-1.3.0.tar.gz" +size = 21678 + +[packages.sdist.hashes] +sha256 = "0e00f8eb65e18c7de20d595a14336e9f337ead580c70934141624b6d1ffdacc7" + +[[packages.wheels]] +name = "uri_template-1.3.0-py3-none-any.whl" +upload-time = 2023-06-21 01:49:03.467606+00:00 +url = "https://files.pythonhosted.org/packages/e7/00/3fca040d7cf8a32776d3d81a00c8ee7457e00f80c649f1e4a863c8321ae9/uri_template-1.3.0-py3-none-any.whl" +size = 11140 + +[packages.wheels.hashes] +sha256 = "a44a133ea12d44a0c0f06d7d42a52d71282e77e2f937d8abd5655b8d56fc1363" + +[[packages]] +name = "uritools" +version = "6.1.3" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "uritools-6.1.3.tar.gz" +upload-time = 2026-07-23 23:17:44.612642+00:00 +url = "https://files.pythonhosted.org/packages/a3/0d/20d02264b6682f07e92cbf7ee43e5e803670d101a03ef204ba18368c321f/uritools-6.1.3.tar.gz" +size = 23909 + +[packages.sdist.hashes] +sha256 = "3a498e7e85ef3249343d5710618d641a414da0fbae6d23053ada7976ee83ea5f" + +[[packages.wheels]] +name = "uritools-6.1.3-py3-none-any.whl" +upload-time = 2026-07-23 23:17:43.275613+00:00 +url = "https://files.pythonhosted.org/packages/ac/76/e9bb35862bcc5b82218d2c017b1eacdcfeb3ba46ce0c0ca8ffc4db80ddbe/uritools-6.1.3-py3-none-any.whl" +size = 11981 + +[packages.wheels.hashes] +sha256 = "136f113e76e53f85bf2d9cce0c3d40ceec775d0409e7d6de9b28f046a7d42838" + +[[packages]] +name = "urllib3" +version = "2.8.0" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "urllib3-2.8.0.tar.gz" +upload-time = 2026-09-15 19:29:36.253420+00:00 +url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz" +size = 458972 + +[packages.sdist.hashes] +sha256 = "63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63" + +[[packages.wheels]] +name = "urllib3-2.8.0-py3-none-any.whl" +upload-time = 2026-09-15 19:29:34.577402+00:00 +url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl" +size = 135717 + +[packages.wheels.hashes] +sha256 = "0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3" + +[[packages]] +name = "uv" +version = "0.13.6" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.8" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "uv-0.13.6.tar.gz" +upload-time = 2026-10-27 00:45:57.605614+00:00 +url = "https://files.pythonhosted.org/packages/08/d5/88d43310d425f6e3a43997ad771658ded3237d0ed78c16a89b2353eddf56/uv-0.13.6.tar.gz" +size = 7545242 + +[packages.sdist.hashes] +sha256 = "d762215478854f6cf20c3faed8f1eb30c8101d568e7bc32a3abafc063929d5c5" + +[[packages.wheels]] +name = "uv-0.13.6-py3-none-macosx_11_0_arm64.whl" +upload-time = 2026-10-27 00:45:09.125609+00:00 +url = "https://files.pythonhosted.org/packages/f4/14/77230cc4f6a73a31578cb8070a5f67f58a76946ead643ae8a4155620d6da/uv-0.13.6-py3-none-macosx_11_0_arm64.whl" +size = 14344205 + +[packages.wheels.hashes] +sha256 = "51361029b7cf91185d0092c4b356d110b4ad629e9cb11593f1e006ac72a72ca9" + +[[packages.wheels]] +name = "uv-0.13.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" +upload-time = 2026-10-27 00:45:31.291019+00:00 +url = "https://files.pythonhosted.org/packages/5c/43/0688ff5142934238f2812e348f4a24e09b57d48bfb38dd8f850325a0d9de/uv-0.13.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" +size = 17333810 + +[packages.wheels.hashes] +sha256 = "22759b8895e1103578de6fb4cd27e94b4399d021023378d29f01333717751fba" + +[[packages.wheels]] +name = "uv-0.13.6-py3-none-win_amd64.whl" +upload-time = 2026-10-27 00:45:52.086199+00:00 +url = "https://files.pythonhosted.org/packages/7c/9d/714523188aea3054644d8e69ae8089aac70325a3cee2d3d05509d4f23398/uv-0.13.6-py3-none-win_amd64.whl" +size = 15334118 + +[packages.wheels.hashes] +sha256 = "7c9bc35ccb65932d8dc10a0669f9c805eaa3c9827ce18ecbecb1bd67944b2cdf" + +[[packages]] +name = "vcs-versioning" +version = "2.6.0" +marker = "\"build\" in dependency_groups" +requires-python = ">=3.8" +dependencies = [ + { name = "packaging" }, +] +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "vcs_versioning-2.6.0.tar.gz" +upload-time = 2026-10-06 22:21:55.024903+00:00 +url = "https://files.pythonhosted.org/packages/ad/e7/2a691db7d076b75d099fdba1a14cd966931f2aeb591e77f6d22f15097326/vcs_versioning-2.6.0.tar.gz" +size = 166800 + +[packages.sdist.hashes] +sha256 = "22e9159288e2d8bca2fa6f6c31c34c9c66aec157f60e9e526f5d160d2516d60f" + +[[packages.wheels]] +name = "vcs_versioning-2.6.0-py3-none-any.whl" +upload-time = 2026-10-06 22:21:53.267565+00:00 +url = "https://files.pythonhosted.org/packages/73/1d/ad4064bf12f4503bf61e65d74c93c523672776d25ee0a06aaf42ae09ef3f/vcs_versioning-2.6.0-py3-none-any.whl" +size = 123154 + +[packages.wheels.hashes] +sha256 = "f8bebd1302ebc12e67ceb30fc7dd698ec969414b6fa43b30c3f14ac9b1e72c41" + +[[packages]] +name = "wcwidth" +version = "0.9.4" +marker = "\"release\" in dependency_groups or \"release-news\" in dependency_groups or \"release-notes\" in dependency_groups or \"release-prepare\" in dependency_groups" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "wcwidth-0.9.4.tar.gz" +upload-time = 2026-10-24 18:11:44.954051+00:00 +url = "https://files.pythonhosted.org/packages/ea/01/e5ac23733628a6bbb91913a765fcf55ee8070d8d991bc88fdaaf805052c7/wcwidth-0.9.4.tar.gz" +size = 970051 + +[packages.sdist.hashes] +sha256 = "fd8d57d3cdfe570e3265c8fab1885c24e34ef40889c0759c0c304a19e9835954" + +[[packages.wheels]] +name = "wcwidth-0.9.4-cp310-abi3-macosx_11_0_arm64.whl" +upload-time = 2026-10-24 18:11:02.008720+00:00 +url = "https://files.pythonhosted.org/packages/04/e9/dfdca30ca36c472de3e260406dee29fc108499ec590c63b3fe279887ee9d/wcwidth-0.9.4-cp310-abi3-macosx_11_0_arm64.whl" +size = 618904 + +[packages.wheels.hashes] +sha256 = "f279f32c8e206a9092fa350e53ca0c2bd8072e45b1c9fd31bb6d476b59b591c4" + +[[packages.wheels]] +name = "wcwidth-0.9.4-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +upload-time = 2026-10-24 18:11:18.748328+00:00 +url = "https://files.pythonhosted.org/packages/fa/e8/0485850748dfdba9443f4151c7b2442cfa4987ba6cd871038eb5d6b8eca9/wcwidth-0.9.4-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl" +size = 785946 + +[packages.wheels.hashes] +sha256 = "b185c8b927b23af2721be1783499d1cfa5c028b098b0858951b4ae224477f1c2" + +[[packages.wheels]] +name = "wcwidth-0.9.4-cp310-abi3-win_amd64.whl" +upload-time = 2026-10-24 18:11:36.952282+00:00 +url = "https://files.pythonhosted.org/packages/d6/f1/c123f902bc2ff9e9c2ab66241b8872204df87cbb18ecdf035e120860fedc/wcwidth-0.9.4-cp310-abi3-win_amd64.whl" +size = 597780 + +[packages.wheels.hashes] +sha256 = "f28d77153303450ee13ebbe888297e75cf532c754555b6cabafc9bdda16c421c" + +[[packages.wheels]] +name = "wcwidth-0.9.4-py3-none-any.whl" +upload-time = 2026-10-24 18:10:52.651030+00:00 +url = "https://files.pythonhosted.org/packages/6f/0c/309b1813b230d1dbbd6f2c2ab2bb21ef68992358977605d9ef289bbfedcc/wcwidth-0.9.4-py3-none-any.whl" +size = 301806 + +[packages.wheels.hashes] +sha256 = "901eace6d2dd25ebb917d0ce5db18e5c537e1504c905cf32f0d006c12098b05d" + +[[packages]] +name = "webcolors" +version = "25.10.0" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.10" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "webcolors-25.10.0.tar.gz" +upload-time = 2025-10-31 07:51:03.977878+00:00 +url = "https://files.pythonhosted.org/packages/1d/7a/eb316761ec35664ea5174709a68bbd3389de60d4a1ebab8808bfc264ed67/webcolors-25.10.0.tar.gz" +size = 53491 + +[packages.sdist.hashes] +sha256 = "62abae86504f66d0f6364c2a8520de4a0c47b80c03fc3a5f1815fedbef7c19bf" + +[[packages.wheels]] +name = "webcolors-25.10.0-py3-none-any.whl" +upload-time = 2025-10-31 07:51:01.778455+00:00 +url = "https://files.pythonhosted.org/packages/e2/cc/e097523dd85c9cf5d354f78310927f1656c422bd7b2613b2db3e3f9a0f2c/webcolors-25.10.0-py3-none-any.whl" +size = 14905 + +[packages.wheels.hashes] +sha256 = "032c727334856fc0b968f63daa252a1ac93d33db2f5267756623c210e57a4f1d" + +[[packages]] +name = "wheel-filename" +version = "1.4.2" +marker = "\"pkg-meta\" in dependency_groups" +requires-python = ">=3.8" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "wheel_filename-1.4.2.tar.gz" +upload-time = 2024-12-01 13:03:16.012739+00:00 +url = "https://files.pythonhosted.org/packages/38/be/726dab762b770d0417e505c58e26d661aac1ec0c831e483cda4817ca2417/wheel_filename-1.4.2.tar.gz" +size = 7911 + +[packages.sdist.hashes] +sha256 = "87891c465dcbb40b40394a906f01a93214bdd51aa5d25e3a9a59cae62bc298fd" + +[[packages.wheels]] +name = "wheel_filename-1.4.2-py3-none-any.whl" +upload-time = 2024-12-01 13:03:00.536117+00:00 +url = "https://files.pythonhosted.org/packages/b4/0f/6e97a3bc38cdde32e3ec49f8c0903fe3559ec9ec9db181782f0bb4417717/wheel_filename-1.4.2-py3-none-any.whl" +size = 6195 + +[packages.wheels.hashes] +sha256 = "3fa599046443d4ca830d06e3d180cd0a675d5871af0a68daa5623318bb4d17e3" + +[[packages]] +name = "xmltodict" +version = "1.0.4" +marker = "\"test\" in dependency_groups or \"type\" in dependency_groups or \"validate\" in extras" +requires-python = ">=3.9" +index = "https://pypi.org/simple/" + +[packages.sdist] +name = "xmltodict-1.0.4.tar.gz" +upload-time = 2026-02-22 02:21:22.074263+00:00 +url = "https://files.pythonhosted.org/packages/19/70/80f3b7c10d2630aa66414bf23d210386700aa390547278c789afa994fd7e/xmltodict-1.0.4.tar.gz" +size = 26124 + +[packages.sdist.hashes] +sha256 = "6d94c9f834dd9e44514162799d344d815a3a4faec913717a9ecbfa5be1bb8e61" + +[[packages.wheels]] +name = "xmltodict-1.0.4-py3-none-any.whl" +upload-time = 2026-02-22 02:21:21.039836+00:00 +url = "https://files.pythonhosted.org/packages/38/34/98a2f52245f4d47be93b580dae5f9861ef58977d73a79eb47c58f1ad1f3a/xmltodict-1.0.4-py3-none-any.whl" +size = 13580 + +[packages.wheels.hashes] +sha256 = "a4a00d300b0e1c59fc2bfccb53d7b2e88c32f200df138a0dd2229f842497026a" + +[tool.nab] +nab-version = "0.0.23" +created-at = 2026-11-07 02:33:11.469337+00:00 +command-line = [ + "nab", + "lock", + "--all-groups", + "--all-extras", + "--no-cache", + "--upgrade", +] +input-path = "pyproject.toml" +mode = "universal" +python-specifier = ">=3.15,<3.16" +platforms = [ + "linux_x86_64", + "macos_arm64", + "windows_amd64", +] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ead9044 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,210 @@ +[build-system] +build-backend = "hatchling.build" +requires = [ + "hatch-vcs>=0.5", + "hatchling>=1.32.4", +] + +[project] +name = "hatch-pep770" +import-names = [ "hatch_pep770" ] +description = "Hatchling build hook that embeds a PEP 770 CycloneDX SBOM in the wheel." +readme = "README.md" +keywords = [ + "cyclonedx", + "hatch", + "pep770", + "sbom", + "spdx", +] +license = "MIT" +maintainers = [ + { name = "Bernรกt Gรกbor", email = "gaborjbernat@gmail.com" }, +] +requires-python = ">=3.9" +classifiers = [ + "Development Status :: 4 - Beta", + "Framework :: Hatch", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", + "Topic :: Security", + "Topic :: Software Development :: Build Tools", +] +dynamic = [ + "version", +] +dependencies = [ + "hatchling>=1.27", + "packaging>=24.2", +] +optional-dependencies.validate = [ + "cyclonedx-python-lib[json-validation]>=11", + "spdx-tools>=0.8.3", +] +urls.Changelog = "https://github.com/tox-dev/hatch-pep770/blob/main/CHANGELOG.md" +urls.Documentation = "https://github.com/tox-dev/hatch-pep770#hatch-pep770" +urls.Homepage = "https://github.com/tox-dev/hatch-pep770" +urls.Source = "https://github.com/tox-dev/hatch-pep770" +urls.Tracker = "https://github.com/tox-dev/hatch-pep770/issues" +scripts.hatch-pep770 = "hatch_pep770.__main__:main" +entry-points.hatch.pep770 = "hatch_pep770.hooks" + +[dependency-groups] +test = [ + "covdefaults>=2.3", + "cyclonedx-python-lib[json-validation]>=11", + "pytest>=8.4.2", + "pytest-cov>=7.1", + "pytest-mock>=3.15.1", + "spdx-tools>=0.8.3", +] +type = [ + "ty>=0.0.84", + { include-group = "test" }, +] +build = [ + "hatch-vcs>=0.5", + "hatchling>=1.32.4", +] +pkg-meta = [ + "check-wheel-contents>=0.6.3", + "twine>=7", + "uv>=0.12.22", +] +release = [ + "prek>=0.5", + "release-creator>=4.4", + "towncrier>=26.9", +] +release-news = [ + "release-creator>=4.4", + "towncrier>=26.9", +] +release-notes = [ + "release-creator>=4.4", +] +release-prepare = [ + "prek>=0.5", + "release-creator>=4.4", + "towncrier>=26.9", +] + +[tool.hatch] +version.source = "vcs" +build.hooks.vcs.version-file = "src/hatch_pep770/version.py" +build.targets.sdist.include = [ + "/src", + "/tests", +] + +[tool.uv] +dependency-groups.release = { requires-python = ">=3.15" } +dependency-groups.release-news = { requires-python = ">=3.15" } +dependency-groups.release-notes = { requires-python = ">=3.15" } +dependency-groups.release-prepare = { requires-python = ">=3.15" } + +[tool.ruff] +line-length = 120 +format.preview = true +format.docstring-code-line-length = 100 +format.docstring-code-format = true +lint.select = [ + "ALL", +] +lint.ignore = [ + "CPY", # No copyright statements + "D1", # docstrings only on the public API, enforced in review + "DOC", # not supported + "incorrect-blank-line-before-class", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible + "missing-trailing-comma", # Conflict with formatter + "multi-line-summary-first-line", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible + "single-line-implicit-string-concatenation", # Conflict with formatter + "subprocess-without-shell-equals-true", # subprocess calls are fine + "suspicious-subprocess-import", # Using subprocess is alright +] +lint.per-file-ignores."tests/**/*.py" = [ + "assert", # asserts allowed in tests + "D", # don't care about documentation in tests + "FBT", # don't care about booleans as positional arguments in tests + "implicit-namespace-package", # no implicit namespace + "magic-value-comparison", # Magic value used in comparison, consider replacing with a constant variable + "pytest-fixture-autouse", # shared setup fixtures are meant to apply to every test + "start-process-with-partial-path", # partial executable path is fine in tests + "subprocess-without-shell-equals-true", # `subprocess` call: check for execution of untrusted input + "too-many-arguments", # fixtures arrive as arguments + "too-many-positional-arguments", # fixtures arrive as arguments +] +lint.isort = { known-first-party = [ + "hatch_pep770", + "tests", +], required-imports = [ + "from __future__ import annotations", +] } +lint.preview = true + +[tool.codespell] +builtin = "clear,usage,en-GB_to_en-US" +ignore-words-list = "acknowledgement" +write-changes = true +count = true + +[tool.pyproject-fmt] +max_supported_python = "3.15" + +[tool.ty] +environment.python-version = "3.15" + +[tool.coverage] +run.parallel = true +run.plugins = [ + "covdefaults", +] +paths.source = [ + "src", + ".tox*/*/lib/python*/site-packages", + ".tox*/pypy*/site-packages", + ".tox*\\*\\Lib\\site-packages", + "*/src", + "*\\src", +] +html.show_contexts = true +html.skip_covered = false + +[tool.towncrier] +name = "hatch-pep770" +directory = "changelog.d" +filename = "CHANGELOG.md" +template = "release_creator.fragments:template.jinja2" +title_format = false +type = [ + { directory = "feature", name = "Added", showcontent = true }, + { directory = "change", name = "Changes", showcontent = true }, + { directory = "bugfix", name = "Fixed", showcontent = true }, + { directory = "doc", name = "Documentation", showcontent = true }, + { directory = "breaking", name = "Breaking changes", showcontent = true }, + { directory = "security", name = "Security", showcontent = true }, + { directory = "performance", name = "Performance", showcontent = true }, + { directory = "deprecation", name = "Deprecated", showcontent = true }, + { directory = "removal", name = "Removed", showcontent = true }, + { directory = "packaging", name = "Packaging", showcontent = true }, +] + +[tool.nab] +mode = "universal" +base-group = "project-runtime" +uploaded-prior-to = "P7D" +decision-order = "stable" +matrix.python = ">=3.15,<3.16" +matrix.platforms = [ "linux_x86_64", "macos_arm64", "windows_amd64" ] +# release-creator 4.4.0 needs a seven-day cutoff exception. +# expires 2026-11-09 +packages.release-creator.uploaded-prior-to = 2026-11-02T21:45:00Z diff --git a/src/hatch_pep770/__init__.py b/src/hatch_pep770/__init__.py new file mode 100644 index 0000000..1aa6c39 --- /dev/null +++ b/src/hatch_pep770/__init__.py @@ -0,0 +1 @@ +"""Embed a PEP 770 CycloneDX SBOM in wheels built with hatchling.""" diff --git a/src/hatch_pep770/__main__.py b/src/hatch_pep770/__main__.py new file mode 100644 index 0000000..e57defc --- /dev/null +++ b/src/hatch_pep770/__main__.py @@ -0,0 +1,62 @@ +"""Command line: render a CycloneDX SBOM as SPDX, or validate the SBOMs in built wheels.""" + +from __future__ import annotations + +import json +import sys +from argparse import ArgumentParser, Namespace +from pathlib import Path + +from .spdx import to_spdx + + +class _Options(Namespace): + command: str + source: Path + target: Path + paths: list[Path] + allow_license: list[str] | None + + +def main(argv: list[str] | None = None) -> int: + parser = ArgumentParser(prog="hatch-pep770", description="Work with the PEP 770 SBOMs hatch-pep770 writes.") + commands = parser.add_subparsers(dest="command", required=True) + spdx = commands.add_parser("spdx", help="render a CycloneDX SBOM as SPDX 2.3 JSON") + spdx.add_argument("source", type=Path, help="the CycloneDX JSON file to read") + spdx.add_argument("target", type=Path, help="the SPDX JSON file to write") + validate = commands.add_parser( + "validate", help="validate the SBOMs in wheels, needs the validate extra: hatch-pep770[validate]" + ) + validate.add_argument("paths", type=Path, nargs="+", help="wheel files, or directories holding them") + validate.add_argument( + "--allow-license", + action="append", + metavar="SPDX-ID", + help="SPDX license id bundled components may use; repeat it per id, leave it out to skip the license policy", + ) + options = parser.parse_args(argv, namespace=_Options()) + if options.command == "spdx": + bom = json.loads(options.source.read_text(encoding="utf-8")) + options.target.write_bytes(f"{json.dumps(to_spdx(bom), indent=2)}\n".encode()) + return 0 + # validate pulls in the optional extra, so the spdx command works without it + from .validate import wheel_problems # ruff: ignore[import-outside-top-level] + + allowed = None if options.allow_license is None else frozenset(options.allow_license) + wheels = sorted(wheel for path in options.paths for wheel in (path.glob("*.whl") if path.is_dir() else [path])) + if not wheels: + sys.stderr.write(f"no wheel found in {', '.join(map(str, options.paths))}\n") + return 1 + failed = False + for wheel in wheels: + for problem in (problems := wheel_problems(wheel, allowed)): + sys.stderr.write(f"SBOM invalid: {wheel.name}: {problem}\n") + if problems: + failed = True + else: + sys.stdout.write(f"SBOM in {wheel.name} is valid\n") + return int(failed) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/src/hatch_pep770/cyclonedx.py b/src/hatch_pep770/cyclonedx.py new file mode 100644 index 0000000..171b825 --- /dev/null +++ b/src/hatch_pep770/cyclonedx.py @@ -0,0 +1,487 @@ +"""CycloneDX 1.6 building blocks shared by the build hook and by projects that describe other artifacts.""" + +from __future__ import annotations + +import base64 +import json +import platform +import re +import sys +import uuid +from datetime import datetime, timezone +from email.parser import Parser +from email.utils import getaddresses +from importlib.metadata import distributions +from typing import TYPE_CHECKING, Final, TypedDict + +from hatchling.builders.utils import get_reproducible_timestamp +from packaging.licenses import InvalidLicenseExpression, canonicalize_license_expression +from packaging.requirements import Requirement + +if TYPE_CHECKING: + from email.message import Message + from importlib.metadata import Distribution, PackageMetadata + + +class OrganizationalEntity(TypedDict): + name: str + url: list[str] + + +class Contact(TypedDict, total=False): + name: str + email: str + + +class Hash(TypedDict): + alg: str + content: str + + +class Property(TypedDict): + name: str + value: str + + +class _ExternalReferenceKeys(TypedDict): + type: str + url: str + + +class ExternalReference(_ExternalReferenceKeys, total=False): + comment: str + + +class _LicenseIdentity(TypedDict, total=False): + id: str + name: str + + +class LicenseInfo(_LicenseIdentity): + acknowledgement: str + + +class License(TypedDict, total=False): + # a CycloneDX license choice holds either a `license` or an `expression` with its `acknowledgement` + license: LicenseInfo + expression: str + acknowledgement: str + + +class _Method(TypedDict): + technique: str + confidence: int + value: str + + +class _Identity(TypedDict): + field: str + confidence: int + methods: list[_Method] + + +class Evidence(TypedDict): + identity: list[_Identity] + + +_ComponentKeys = TypedDict("_ComponentKeys", {"type": str, "bom-ref": str, "name": str}) + + +class _ComponentFields(TypedDict, total=False): + version: str + purl: str + supplier: OrganizationalEntity + authors: list[Contact] + description: str + licenses: list[License] + copyright: str + hashes: list[Hash] + externalReferences: list[ExternalReference] + properties: list[Property] + evidence: Evidence + components: list[Component] + + +class Component(_ComponentKeys, _ComponentFields): + pass + + +class Dependency(TypedDict): + ref: str + dependsOn: list[str] + + +class _Ref(TypedDict): + ref: str + + +class _Output(TypedDict): + type: str + resource: _Ref + + +class _Input(TypedDict): + environmentVars: list[Property] + + +Workflow = TypedDict( + "Workflow", + { + "bom-ref": str, + "uid": str, + "name": str, + "taskTypes": list[str], + "resourceReferences": list[_Ref], + "inputs": list[_Input], + "outputs": list[_Output], + }, +) +Formula = TypedDict("Formula", {"bom-ref": str, "workflows": list[Workflow]}) + + +class _Lifecycle(TypedDict): + phase: str + + +class _Tools(TypedDict): + components: list[Component] + + +class _MetadataKeys(TypedDict): + timestamp: str + lifecycles: list[_Lifecycle] + tools: _Tools + component: Component + + +class Metadata(_MetadataKeys, total=False): + manufacturer: OrganizationalEntity + supplier: OrganizationalEntity + authors: list[Contact] + licenses: list[License] + properties: list[Property] + + +class Composition(TypedDict): + aggregate: str + dependencies: list[str] + + +class _BodyKeys(TypedDict): + metadata: Metadata + components: list[Component] + dependencies: list[Dependency] + formulation: list[Formula] + + +class Body(_BodyKeys, total=False): + compositions: list[Composition] + + +_Header = TypedDict( + "_Header", {"$schema": str, "bomFormat": str, "specVersion": str, "serialNumber": str, "version": int} +) + + +class Document(_Header, Body): + pass + + +# the label normalization and mapping cyclonedx-py applies to Project-URL entries, plus "source", so the same metadata +# yields the same reference types whichever generator produced the document +_URL_LABEL_TO_REFERENCE_TYPE: Final[dict[str, str]] = { + "bugtracker": "issue-tracker", + "issuetracker": "issue-tracker", + "issues": "issue-tracker", + "bugreports": "issue-tracker", + "tracker": "issue-tracker", + "home": "website", + "homepage": "website", + "download": "distribution", + "documentation": "documentation", + "docs": "documentation", + "changelog": "release-notes", + "changes": "release-notes", + "source": "vcs", + "repository": "vcs", + "github": "vcs", + "chat": "chat", +} +# core metadata headers copied verbatim onto a component as properties +_METADATA_PROPERTIES: Final[tuple[str, ...]] = ( + "Requires-Python", + "Requires-Dist", + "Provides-Extra", + "Classifier", + "Keywords", +) +# only the license classifiers that name exactly one SPDX license; "BSD License" or "Apache Software License" leave the +# version or variant open +_CLASSIFIER_LICENSES: Final[dict[str, str]] = { + "ISC License (ISCL)": "ISC", + "MIT License": "MIT", + "MIT No Attribution License (MIT-0)": "MIT-0", + "Mozilla Public License 2.0 (MPL 2.0)": "MPL-2.0", + "Python Software Foundation License": "PSF-2.0", + "The Unlicense (Unlicense)": "Unlicense", +} +_RECORD_HASH_ALGORITHMS: Final[dict[str, str]] = { + "md5": "MD5", + "sha1": "SHA-1", + "sha256": "SHA-256", + "sha384": "SHA-384", + "sha512": "SHA-512", +} + + +def document(body: Body, namespace: uuid.UUID) -> Document: + """ + Wrap a document body in the CycloneDX 1.6 header. + + :param body: the metadata, components, dependencies and formulation of the document + :param namespace: UUID namespace for the serial number, one per project + :returns: the complete document, whose serial number derives from the body so identical bodies share it + + """ + return { + "$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json", + "bomFormat": "CycloneDX", + "specVersion": "1.6", + "serialNumber": f"urn:uuid:{uuid.uuid5(namespace, json.dumps(body, sort_keys=True))}", + "version": 1, + **body, + } + + +def timestamp() -> str: + """ + Format the build time for the document. + + :returns: the ISO 8601 time from ``SOURCE_DATE_EPOCH``, or hatchling's fixed default when unset + + """ + return datetime.fromtimestamp(get_reproducible_timestamp(), tz=timezone.utc).isoformat() + + +def purl(name: str, version: str | None = None) -> str: + """ + Build the package URL of a Python distribution. + + :param name: distribution name, normalized here + :param version: version, or ``None`` for an unversioned purl + :returns: the ``pkg:pypi`` package URL + + """ + normalized = re.sub(r"[-_.]+", "-", name).lower() + return f"pkg:pypi/{normalized}@{version}" if version else f"pkg:pypi/{normalized}" + + +def external_reference(label: str, url: str) -> ExternalReference: + """ + Turn a ``Project-URL`` entry into an external reference. + + :param label: the entry's label, which picks the reference type + :param url: the entry's URL + :returns: the reference, typed ``other`` when the label is not a known one + + """ + reference_type = _URL_LABEL_TO_REFERENCE_TYPE.get(re.sub(r"[^a-z]", "", label.lower()), "other") + return {"type": reference_type, "url": url, "comment": f"Project-URL: {label}"} + + +def contacts(names: list[str], addresses: list[str]) -> list[Contact]: + """ + Turn core metadata author or maintainer fields into CycloneDX contacts. + + :param names: bare names, from ``Author`` or ``Maintainer`` + :param addresses: RFC 5322 addresses, from ``Author-email`` or ``Maintainer-email`` + :returns: one contact per name, then one per address + + """ + found: list[Contact] = [{"name": name} for name in names] + for name, email in getaddresses(addresses): + contact: Contact = {} + if name: + contact["name"] = name + if email: + contact["email"] = email + found.append(contact) + return found + + +def component_from_metadata(metadata: PackageMetadata | Message, component_type: str) -> Component: + """ + Describe a distribution from its core metadata. + + :param metadata: the distribution's ``METADATA`` + :param component_type: the CycloneDX component type, such as ``library`` + :returns: the component, with its purl as ``bom-ref``, licenses, Project-URL references and metadata properties + + """ + name, version = metadata["Name"], metadata["Version"] + component: Final[Component] = { + "type": component_type, + "bom-ref": (package := purl(name, version)), + "name": name, + "version": version, + "purl": package, + } + if summary := metadata.get("Summary"): + component["description"] = summary + if authors := contacts( + metadata.get_all("Author", []) + metadata.get_all("Maintainer", []), + metadata.get_all("Author-email", []) + metadata.get_all("Maintainer-email", []), + ): + component["authors"] = authors + if licenses := _licenses(metadata): + component["licenses"] = licenses + component["externalReferences"] = [ + external_reference(label.strip(), url.strip()) + for label, url in (entry.split(",", 1) for entry in metadata.get_all("Project-URL", [])) + ] + if home_page := metadata.get("Home-page"): + component["externalReferences"].insert(0, {"type": "website", "url": home_page}) + component["properties"] = [ + {"name": f"python:{header.lower()}", "value": value} + for header in _METADATA_PROPERTIES + for value in metadata.get_all(header, []) + ] + return component + + +def _licenses(metadata: PackageMetadata | Message) -> list[License]: + if expression := metadata.get("License-Expression"): + return [{"expression": expression, "acknowledgement": "declared"}] + names = [ + entry.rsplit(" :: ", 1)[-1] for entry in metadata.get_all("Classifier", []) if entry.startswith("License :: ") + ] + if (declared := metadata.get("License")) and "\n" not in declared: + names.append(declared) + licenses: Final[list[License]] = [{"license": {"name": name, "acknowledgement": "declared"}} for name in names] + # a license policy judges SPDX ids only, so a component keeps its bare names when any one of them does not resolve, + # and the policy reports it instead of judging a partial set + identifiers: Final[list[str]] = [identifier for name in names if (identifier := _spdx_license(name)) is not None] + if len(identifiers) == len(names): + licenses.extend( + {"license": {"id": identifier, "acknowledgement": "concluded"}} for identifier in dict.fromkeys(identifiers) + ) + return licenses + + +def _spdx_license(name: str) -> str | None: + if identifier := _CLASSIFIER_LICENSES.get(name): + return identifier + try: + canonical = canonicalize_license_expression(name) + except InvalidLicenseExpression: + return None + # a CycloneDX license id holds one entry of the SPDX license list, never an expression or a LicenseRef + return canonical if re.fullmatch(r"[A-Za-z0-9.-]+", canonical) and not canonical.startswith("LicenseRef-") else None + + +def file_component(parent_ref: str, path: str, digest: str, size: str) -> Component: + """ + Describe one file from a wheel ``RECORD`` row. + + :param parent_ref: ``bom-ref`` of the component that holds the file + :param path: the file's path inside the wheel + :param digest: the ``RECORD`` digest, ``=`` + :param size: the file's size in bytes + :returns: a ``file`` component with the digest as a lowercase hex hash + + """ + algorithm, _, encoded = digest.partition("=") + raw = base64.urlsafe_b64decode(encoded + "=" * (-len(encoded) % 4)) + return { + "type": "file", + "bom-ref": f"{parent_ref}#{path}", + "name": path, + "hashes": [{"alg": _RECORD_HASH_ALGORITHMS[algorithm], "content": raw.hex()}], + "properties": [{"name": "size", "value": size}], + } + + +def build_tools() -> tuple[list[Component], list[Dependency]]: + """ + Describe the running build environment: the interpreter and every installed distribution. + + Nothing about the build machine goes in, so the same toolchain yields the same record on any operating system or + architecture. A pure-Python distribution lists its files with their hashes; a platform one does not, because its + files differ per machine. + + :returns: the tool components, interpreter first, and the dependency graph between the distributions + + """ + interpreter = f"pkg:generic/{sys.implementation.name}@{platform.python_version()}" + tools: Final[list[Component]] = [ + { + "type": "platform", + "bom-ref": f"tool:{interpreter}", + "name": sys.implementation.name, + "version": platform.python_version(), + "purl": interpreter, + "properties": [{"name": "python:implementation", "value": platform.python_implementation()}], + }, + ] + # bom-refs are prefixed because the same distribution can be both a build tool and a component of the artifact + installed = {purl(distribution.metadata["Name"]): distribution for distribution in distributions()} + tool_dependencies: Final[list[Dependency]] = [] + for distribution in (installed[key] for key in sorted(installed)): + component = component_from_metadata(distribution.metadata, "library") + component["bom-ref"] = f"tool:{component['purl']}" + if Parser().parsestr(distribution.read_text("WHEEL") or "")["Root-Is-Purelib"] == "true": + component["components"] = [ + file_component( + component["bom-ref"], file.as_posix(), f"{file.hash.mode}={file.hash.value}", str(file.size) + ) + for file in distribution.files or [] + # console-script launchers live outside site-packages and embed the build env's interpreter path in + # their shebang, so their hash differs on every build and says nothing about the distribution; the + # installer metadata names the build frontend that set up the env rather than the distribution + if file.hash is not None + and not file.as_posix().startswith("../") + and not ( + file.parent.suffix == ".dist-info" and file.name in {"INSTALLER", "REQUESTED", "direct_url.json"} + ) + ] + tools.append(component) + tool_dependencies.append({"ref": component["bom-ref"], "dependsOn": _depends_on(distribution, installed)}) + return tools, tool_dependencies + + +def _depends_on(distribution: Distribution, installed: dict[str, Distribution]) -> list[str]: + refs = set() + for requirement in map(Requirement, distribution.requires or []): + if (requirement.marker is None or requirement.marker.evaluate()) and ( + dependency := installed.get(purl(requirement.name)) + ): + refs.add(f"tool:{purl(dependency.metadata['Name'], dependency.version)}") + return sorted(refs) + + +__all__ = [ + "Body", + "Component", + "Composition", + "Contact", + "Dependency", + "Document", + "Evidence", + "ExternalReference", + "Formula", + "Hash", + "License", + "LicenseInfo", + "Metadata", + "OrganizationalEntity", + "Property", + "Workflow", + "build_tools", + "component_from_metadata", + "contacts", + "document", + "external_reference", + "file_component", + "purl", + "timestamp", +] diff --git a/src/hatch_pep770/hooks.py b/src/hatch_pep770/hooks.py new file mode 100644 index 0000000..9138d5b --- /dev/null +++ b/src/hatch_pep770/hooks.py @@ -0,0 +1,17 @@ +"""Register the build hook with hatchling.""" + +from __future__ import annotations + +from hatchling.plugin import hookimpl + +from .plugin import Pep770BuildHook + + +@hookimpl +def hatch_register_build_hook() -> type[Pep770BuildHook]: + return Pep770BuildHook + + +__all__ = [ + "hatch_register_build_hook", +] diff --git a/src/hatch_pep770/plugin.py b/src/hatch_pep770/plugin.py new file mode 100644 index 0000000..ccc706d --- /dev/null +++ b/src/hatch_pep770/plugin.py @@ -0,0 +1,453 @@ +"""The hatchling build hook that writes a PEP 770 CycloneDX SBOM into the wheel.""" + +from __future__ import annotations + +import csv +import hashlib +import json +import shutil +import subprocess +import tempfile +import uuid +import zipfile +from email.parser import Parser +from functools import cached_property +from io import StringIO +from itertools import starmap +from pathlib import Path, PurePosixPath +from typing import TYPE_CHECKING, Any, Final +from urllib.parse import urlsplit + +from hatchling.__about__ import __version__ as hatchling_version +from hatchling.builders.hooks.plugin.interface import BuildHookInterface +from hatchling.builders.utils import get_reproducible_timestamp +from hatchling.builders.wheel import WheelBuilder +from hatchling.utils.constants import DEFAULT_BUILD_SCRIPT +from packaging.requirements import Requirement + +from .cyclonedx import ( + build_tools, + component_from_metadata, + contacts, + document, + external_reference, + file_component, + purl, + timestamp, +) + +if TYPE_CHECKING: + from email.message import Message + + from hatchling.metadata.core import CoreMetadata + from packaging.specifiers import Specifier + + from .cyclonedx import ( + Body, + Component, + Contact, + Dependency, + Document, + ExternalReference, + License, + OrganizationalEntity, + Property, + Workflow, + ) + + +class Pep770BuildHook(BuildHookInterface): + """ + Write a PEP 770 CycloneDX 1.6 SBOM into the wheel's ``.dist-info/sboms/`` directory. + + The document describes the project from its core metadata, the runtime dependencies it declares, any wheels it + bundles as data files, and the build toolchain. It holds nothing about the build machine and takes its timestamp + from ``SOURCE_DATE_EPOCH``, so a rebuild with the same source, toolchain and epoch produces the same bytes on any + operating system. + + Subclass it in a hatchling custom build hook to add project-specific detail; see :meth:`bundled_wheel_properties`. + + """ + + PLUGIN_NAME = "pep770" + _sbom_directory: Path | None = None + + def initialize(self, version: str, build_data: dict[str, Any]) -> None: # ruff: ignore[unused-method-argument] + # `version` is hatchling's build variant name (e.g. "standard"), not the package version + if not isinstance(builder := self.build_config.builder, WheelBuilder): + return + if "sbom_files" not in build_data: # pragma: <3.10 cover # hatchling 1.28, the first with it, needs 3.10 + self.app.display_warning( + f"hatchling {hatchling_version} cannot embed SBOMs (1.28 adds it), so none written" + ) + return + tag = build_data.get("tag") or ( + builder.get_best_matching_tag() if build_data["infer_tag"] else builder.get_default_tag() + ) + content = json.dumps(self._document(f"{builder.artifact_project_id}-{tag}.whl"), indent=2) + # written outside self.directory, which hatchling also uses as the wheel's output directory, so no stray copy + # lands next to the built artifacts + self._sbom_directory = Path(tempfile.mkdtemp(prefix="hatch-pep770-")) + # bytes, so the line endings do not depend on the build machine's OS + (out := self._sbom_directory / f"{self._namespace}.cdx.json").write_bytes(f"{content}\n".encode()) + build_data["sbom_files"].append(str(out)) + + def finalize(self, version: str, build_data: dict[str, Any], artifact_path: str) -> None: # ruff: ignore[unused-method-argument] + if self._sbom_directory is not None: + shutil.rmtree(self._sbom_directory) + self._sbom_directory = None + + def bundled_wheel_properties(self, wheel: Path) -> list[Property]: # ruff: ignore[unused-method-argument, no-self-use] + """ + Return extra properties for one wheel the project bundles as a data file. + + The default adds none. A subclass overrides it to say what the project does with the wheel, for example which + Python versions receive it. The properties follow ``:bundled-wheel`` and precede the ones taken from + the wheel's metadata. + + :param wheel: the bundled wheel, an absolute path under the project root + :returns: the properties to add + + """ + return [] + + @property + def _namespace(self) -> str: + # hatchling normalizes the name; it also prefixes the CycloneDX property names this hook writes + return self.metadata.core.name + + def _document(self, wheel_name: str) -> Document: + core: Final[CoreMetadata] = self.metadata.core + version: Final[str] = self.metadata.version + root = self._root_component(core, version, wheel_name) + bundled = [self._bundled_component(wheel) for wheel in self._bundled_wheels] + declared = [self._declared_dependency(requirement) for requirement in core.dependencies] + tools, tool_dependencies = build_tools() + if script := self._build_script_tool(version): + tools.insert(0, script) + bundled_dependencies: Final[list[Dependency]] = [ + {"ref": component["bom-ref"], "dependsOn": references} + for component in bundled + if (references := [child["bom-ref"] for child in component["components"] if child["type"] == "library"]) + ] + supplier = self._supplier + body: Final[Body] = { + "metadata": { + "timestamp": timestamp(), + "lifecycles": [{"phase": "build"}], + "tools": {"components": tools}, + **({"manufacturer": supplier} if supplier else {}), + **({"authors": self._authors} if self._authors else {}), + **({"supplier": supplier} if supplier else {}), + "component": root, + **({"licenses": self._licenses} if self._licenses else {}), + "properties": [{"name": f"{self._namespace}:sbom:scope", "value": self._scope}], + }, + "components": [*bundled, *declared], + "dependencies": [ + {"ref": root["bom-ref"], "dependsOn": [component["bom-ref"] for component in [*bundled, *declared]]}, + *bundled_dependencies, + *tool_dependencies, + ], + # transitive runtime dependencies are unknown until install time + "compositions": [{"aggregate": "incomplete", "dependencies": [root["bom-ref"]]}], + "formulation": [{"bom-ref": "formula:wheel-build", "workflows": [self._workflow(root, tools)]}], + } + base: Final[str] = self._repository or f"https://pypi.org/project/{self._namespace}" + return document(body, uuid.uuid5(uuid.NAMESPACE_URL, f"{base}/sboms")) + + def _root_component(self, core: CoreMetadata, version: str, wheel_name: str) -> Component: + package = purl(core.name, version) + references: Final[list[ExternalReference]] = list(starmap(external_reference, core.urls.items())) + references.extend([ + {"type": "distribution", "url": f"https://pypi.org/project/{core.name}/{version}/"}, + {"type": "attestation", "url": f"https://pypi.org/integrity/{core.name}/{version}/{wheel_name}/provenance"}, + ]) + if (repository := self._repository) and urlsplit(repository).netloc == "github.com": + references.extend([ + {"type": "security-contact", "url": f"{repository}/security/policy"}, + {"type": "advisories", "url": f"{repository}/security/advisories"}, + ]) + if repository and core.license_files: + references.append({"type": "license", "url": f"{repository}/blob/{self._branch}/{core.license_files[0]}"}) + properties: Final[list[Property]] = [] + if core.requires_python: + properties.append({"name": f"{self._namespace}:requires-python", "value": core.requires_python}) + properties.extend({"name": "python:classifier", "value": classifier} for classifier in core.classifiers) + properties.extend({"name": "python:keyword", "value": keyword} for keyword in core.keywords) + if commit := self._commit(): + if repository: + references.append({ + "type": "vcs", + "url": f"{repository}/tree/{commit}", + "comment": "exact source revision", + }) + properties.append({"name": f"{self._namespace}:vcs-commit", "value": commit}) + supplier = self._supplier + copyright_line = self._copyright(core.license_files) + return { + "type": "application", + "bom-ref": package, + **({"supplier": supplier} if supplier else {}), + **({"authors": self._authors} if self._authors else {}), + "name": core.name, + "version": version, + **({"description": core.description} if core.description else {}), + **({"licenses": self._licenses} if self._licenses else {}), + **({"copyright": copyright_line} if copyright_line else {}), + "purl": package, + "externalReferences": references, + "properties": properties, + } + + @cached_property + def _supplier(self) -> OrganizationalEntity | None: + if (supplier := self.config.get("supplier")) is None: + return None + if not ( + isinstance(supplier, dict) + and isinstance(name := supplier.get("name"), str) + and isinstance(urls := supplier.get("url", []), list) + and all(isinstance(url, str) for url in urls) + and supplier.keys() <= {"name", "url"} + ): + msg = f"{self._option('supplier')} must be a table with a string `name` and an optional `url` string array" + raise TypeError(msg) + return {"name": name, "url": urls} + + def _option(self, name: str) -> str: + return f"Option `{name}` of build hook `{self.PLUGIN_NAME}`" + + @cached_property + def _authors(self) -> list[Contact]: + maintainers = self.metadata.core.maintainers_data + authors = self.metadata.core.authors_data + people = maintainers if maintainers["name"] or maintainers["email"] else authors + return contacts(people["name"], people["email"]) + + @cached_property + def _licenses(self) -> list[License]: + if expression := self.metadata.core.license_expression: + return [{"expression": expression, "acknowledgement": "declared"}] + return [] + + @cached_property + def _repository(self) -> str | None: + if (repository := self.config.get("repository")) is not None: + if not isinstance(repository, str): + msg = f"{self._option('repository')} must be a string" + raise TypeError(msg) + return repository.rstrip("/") + return next( + ( + url.rstrip("/") + for label, url in self.metadata.core.urls.items() + if external_reference(label, url)["type"] == "vcs" + ), + None, + ) + + @cached_property + def _branch(self) -> str: + if not isinstance(branch := self.config.get("default-branch", "main"), str): + msg = f"{self._option('default-branch')} must be a string" + raise TypeError(msg) + return branch + + def _commit(self) -> str | None: + if not (Path(self.root) / ".git").exists() or (git := shutil.which("git")) is None: # building from an sdist + return None + try: + result = subprocess.run( + [git, "rev-parse", "HEAD"], check=True, capture_output=True, text=True, cwd=self.root + ) + except subprocess.CalledProcessError as error: + self.app.display_warning(f"git rev-parse HEAD failed, so the SBOM names no source revision: {error.stderr}") + return None + return result.stdout.strip() + + def _copyright(self, license_files: list[str]) -> str | None: + for license_file in license_files: + for line in (Path(self.root) / license_file).read_text(encoding="utf-8").splitlines(): + if line.startswith("Copyright"): + return line + return None + + @cached_property + def _bundled_wheels(self) -> list[Path]: + root = Path(self.root) + found = {path for pattern in self._bundled_patterns for path in root.glob(pattern)} + return sorted(found, key=lambda path: path.relative_to(root).as_posix()) + + @cached_property + def _bundled_patterns(self) -> list[str]: + patterns = self.config.get("bundled-wheels", []) + if not (isinstance(patterns, list) and all(isinstance(pattern, str) for pattern in patterns)): + msg = f"{self._option('bundled-wheels')} must be an array of strings" + raise TypeError(msg) + return patterns + + def _bundled_component(self, wheel: Path) -> Component: + with zipfile.ZipFile(wheel) as archive: + members: Final[list[str]] = sorted(archive.namelist()) + metadata_name: Final[str] = next( + name for name in members if name.count("/") == 1 and name.endswith(".dist-info/METADATA") + ) + metadata = Parser().parsestr(archive.read(metadata_name).decode("utf-8")) + record = archive.read(metadata_name.replace("METADATA", "RECORD")).decode("utf-8") + vendored_metadata: Final[list[tuple[str, Message]]] = [ + *self._vendor_manifest(wheel, archive, members), + *( + (name, Parser().parsestr(archive.read(name).decode("utf-8"))) + for name in members + if "/_vendor/" in name and name.endswith(".dist-info/METADATA") + ), + ] + component = component_from_metadata(metadata, "library") + if ( + (supplier := self._supplier) + and (owner := self._repository_owner) + and any(reference["url"].startswith(owner) for reference in component["externalReferences"]) + ): + component["supplier"] = supplier + sha256 = hashlib.sha256(wheel.read_bytes()).hexdigest() + component["hashes"] = [{"alg": "SHA-256", "content": sha256}] + component["externalReferences"].append( + {"type": "distribution", "url": f"https://pypi.org/project/{metadata['Name']}/{metadata['Version']}/"}, + ) + component["properties"] = [ + {"name": f"{self._namespace}:bundled-wheel", "value": wheel.relative_to(self.root).as_posix()}, + *self.bundled_wheel_properties(wheel), + *component["properties"], + ] + component["evidence"] = { + "identity": [ + { + "field": "purl", + "confidence": 1, + "methods": [{"technique": "manifest-analysis", "confidence": 1, "value": metadata_name}], + }, + { + "field": "hash", + "confidence": 1, + "methods": [{"technique": "hash-comparison", "confidence": 1, "value": sha256}], + }, + ], + } + component["components"] = [ + file_component(component["bom-ref"], path, digest, size) + for path, digest, size in (row for row in csv.reader(StringIO(record, newline="")) if row) + if digest + ] + vendored_components: Final[dict[str, Component]] = {} + for source, vendored in vendored_metadata: + child: Final[Component] = component_from_metadata(vendored, "library") + child["bom-ref"] = f"{component['bom-ref']}#vendored/{child['purl']}" + child["properties"].append({"name": f"{self._namespace}:vendored-manifest", "value": source}) + child["evidence"] = { + "identity": [ + { + "field": "purl", + "confidence": 1, + "methods": [{"technique": "manifest-analysis", "confidence": 1, "value": source}], + } + ], + } + # a distribution's own .dist-info wins over the pip-style manifest line naming the same purl + vendored_components[child["purl"]] = child + component["components"].extend(vendored_components[key] for key in sorted(vendored_components)) + return component + + @staticmethod + def _vendor_manifest(wheel: Path, archive: zipfile.ZipFile, members: list[str]) -> list[tuple[str, Message]]: + # pip lists what it vendors in _vendor/vendor.txt instead of shipping each vendored .dist-info + found: Final[list[tuple[str, Message]]] = [] + for name in members: + if not name.endswith("/_vendor/vendor.txt"): + continue + for line in archive.read(name).decode("utf-8").splitlines(): + if not (requirement := line.partition("#")[0].strip()): + continue + parsed: Final[Requirement] = Requirement(requirement) + pins: Final[list[Specifier]] = list(parsed.specifier) + if len(pins) != 1 or pins[0].operator != "==" or "*" in pins[0].version: + msg: Final[str] = f"Unpinned vendored dependency in {wheel.name}:{name}: {requirement}" + raise ValueError(msg) + found.append((name, Parser().parsestr(f"Name: {parsed.name}\nVersion: {pins[0].version}\n"))) + return found + + @cached_property + def _repository_owner(self) -> str | None: + # a bundled wheel published from the same forge account as this project shares its supplier + if (repository := self._repository) is None: + return None + parts = urlsplit(repository) + return f"{parts.scheme}://{parts.netloc}/{parts.path.strip('/').split('/')[0]}/" + + def _declared_dependency(self, requirement: str) -> Component: + parsed = Requirement(requirement) + component: Final[Component] = { + "type": "library", + # the same distribution can be declared more than once with different markers, so the purl is not unique + "bom-ref": f"requires-dist:{requirement}", + "name": parsed.name, + "purl": purl(parsed.name), + "externalReferences": [{"type": "distribution", "url": f"https://pypi.org/project/{parsed.name}/"}], + "properties": [{"name": f"{self._namespace}:requires-dist", "value": requirement}], + } + if parsed.marker is not None: + component["properties"].append({ + "name": f"{self._namespace}:environment-marker", + "value": str(parsed.marker), + }) + return component + + def _build_script_tool(self, version: str) -> Component | None: + # a custom build hook script shapes the document, so it is part of the toolchain a rebuild has to match + if self.PLUGIN_NAME != "custom": + return None + script = PurePosixPath(self.config.get("path", DEFAULT_BUILD_SCRIPT)) + tool: Final[Component] = { + "type": "application", + "bom-ref": f"tool:{script}", + "name": script.name, + "version": version, + "hashes": [ + {"alg": "SHA-256", "content": hashlib.sha256((Path(self.root) / script).read_bytes()).hexdigest()} + ], + } + if repository := self._repository: + tool["externalReferences"] = [{"type": "vcs", "url": f"{repository}/blob/{self._branch}/{script}"}] + return tool + + @staticmethod + def _workflow(root: Component, tools: list[Component]) -> Workflow: + return { + "bom-ref": "workflow:wheel-build", + "uid": "wheel-build", + "name": "build the wheel and this SBOM", + "taskTypes": ["build"], + "resourceReferences": [{"ref": tool["bom-ref"]} for tool in tools], + "outputs": [{"type": "artifact", "resource": {"ref": root["bom-ref"]}}], + "inputs": [ + {"environmentVars": [{"name": "SOURCE_DATE_EPOCH", "value": str(get_reproducible_timestamp())}]}, + ], + } + + @cached_property + def _scope(self) -> str: + declared = ( + "the direct runtime dependencies declared in the wheel's core metadata. The latter carry no version" + " because they are resolved at install time, not at build time." + ) + if directories := sorted({str(PurePosixPath(pattern).parent) for pattern in self._bundled_patterns}): + return f"Components are the wheels bundled as data files under {' and '.join(directories)} and {declared}" + return ( + "Components are the direct runtime dependencies declared in the wheel's core metadata. They carry no" + " version because they are resolved at install time, not at build time." + ) + + +__all__ = [ + "Pep770BuildHook", +] diff --git a/src/hatch_pep770/spdx.py b/src/hatch_pep770/spdx.py new file mode 100644 index 0000000..afcb2c7 --- /dev/null +++ b/src/hatch_pep770/spdx.py @@ -0,0 +1,213 @@ +"""Render a CycloneDX SBOM written by the build hook as an SPDX 2.3 JSON document.""" + +from __future__ import annotations + +import re +from datetime import datetime, timezone +from typing import TYPE_CHECKING, Final, TypedDict + +from .version import __version__ + +if TYPE_CHECKING: + from collections.abc import Iterator + + from .cyclonedx import Component, Document, License + + +class _Checksum(TypedDict): + algorithm: str + checksumValue: str + + +class _ExternalRef(TypedDict): + referenceCategory: str + referenceType: str + referenceLocator: str + + +class _PackageKeys(TypedDict): + SPDXID: str + name: str + downloadLocation: str + filesAnalyzed: bool + licenseConcluded: str + licenseDeclared: str + primaryPackagePurpose: str + + +class _Package(_PackageKeys, total=False): + versionInfo: str + supplier: str + checksums: list[_Checksum] + homepage: str + copyrightText: str + summary: str + comment: str + externalRefs: list[_ExternalRef] + licenseComments: str + + +class _Relationship(TypedDict): + spdxElementId: str + relationshipType: str + relatedSpdxElement: str + + +class _CreationInfo(TypedDict): + created: str + creators: list[str] + + +class Spdx(TypedDict): + spdxVersion: str + dataLicense: str + SPDXID: str + name: str + documentNamespace: str + comment: str + creationInfo: _CreationInfo + packages: list[_Package] + relationships: list[_Relationship] + + +_PURPOSES: Final[dict[str, str]] = { + "application": "APPLICATION", + "library": "LIBRARY", + "platform": "OTHER", +} + + +def to_spdx(bom: Document) -> Spdx: + """ + Render a CycloneDX document as SPDX 2.3. + + Packages keep their hashes, licenses and purls, and the containment, dependency and build tool relationships carry + over. Per-file hashes stay behind, because SPDX 2.3 requires a SHA-1 for every file and wheel ``RECORD`` files hold + SHA-256, and so does the build formulation, which SPDX 2.3 has no field for. + + :param bom: a CycloneDX document as the build hook writes it + :returns: the SPDX document, whose namespace ends in the CycloneDX serial number so both name the same build + + """ + root: Final[Component] = bom["metadata"]["component"] + tools: Final[list[Component]] = bom["metadata"]["tools"]["components"] + name: Final[str] = f"{root['name']}-{root['version']}" + namespace: Final[str] = re.sub(r"[-_.]+", "-", root["name"]).lower() + repository: Final[str] = next( + ( + reference["url"] + for reference in root.get("externalReferences", []) + if reference["type"] == "vcs" and "Project-URL" in reference.get("comment", "") + ), + "https://spdx.org/spdxdocs", + ) + components: Final[list[Component]] = list(_walk([root, *bom["components"], *tools])) + supplier: Final[list[str]] = ( + [f"Organization: {bom['metadata']['supplier']['name']}"] if "supplier" in bom["metadata"] else [] + ) + return { + "spdxVersion": "SPDX-2.3", + "dataLicense": "CC0-1.0", + "SPDXID": "SPDXRef-DOCUMENT", + "name": name, + "documentNamespace": f"{repository}/sboms/{name}-{bom['serialNumber'].removeprefix('urn:uuid:')}", + "comment": f"Rendered from the CycloneDX SBOM {bom['serialNumber']} ({namespace}.cdx.json), which also carries" + " per-file hashes and the build formulation.", + "creationInfo": { + "created": datetime + .fromisoformat(bom["metadata"]["timestamp"]) + .astimezone(timezone.utc) + .strftime("%Y-%m-%dT%H:%M:%SZ"), + "creators": [ + *supplier, + *(f"Tool: {tool['name']}-{tool['version']}" for tool in tools if tool["type"] == "application"), + f"Tool: hatch-pep770-{__version__}", + ], + }, + "packages": [_package(component, f"{namespace}:") for component in components], + "relationships": [ + _relationship("SPDXRef-DOCUMENT", "DESCRIBES", _spdx_id(root["bom-ref"])), + *( + _relationship(_spdx_id(parent["bom-ref"]), "CONTAINS", _spdx_id(child["bom-ref"])) + for parent in components + for child in parent.get("components", []) + if child["type"] != "file" + ), + *( + _relationship(_spdx_id(entry["ref"]), "DEPENDS_ON", _spdx_id(dependency)) + for entry in bom["dependencies"] + for dependency in entry["dependsOn"] + ), + *(_relationship(_spdx_id(tool["bom-ref"]), "BUILD_TOOL_OF", _spdx_id(root["bom-ref"])) for tool in tools), + ], + } + + +def _walk(components: list[Component]) -> Iterator[Component]: + # file components mirror wheel RECORD entries, which carry no SHA-1 and so cannot become SPDX files + for component in components: + if component["type"] != "file": + yield component + yield from _walk(component.get("components", [])) + + +def _package(component: Component, property_prefix: str) -> _Package: + # the hook writes either one SPDX expression, or the free-form names from License/classifier metadata plus the SPDX + # ids it concluded from them + licenses: Final[list[License]] = component.get("licenses", []) + concluded: Final[list[str]] = [ + entry["license"]["id"] for entry in licenses if "license" in entry and "id" in entry["license"] + ] + package: Final[_Package] = { + "SPDXID": _spdx_id(component["bom-ref"]), + "name": component["name"], + "downloadLocation": "NOASSERTION", + "filesAnalyzed": False, + "licenseConcluded": " AND ".join(concluded) or "NOASSERTION", + "licenseDeclared": next((entry["expression"] for entry in licenses if "expression" in entry), "NOASSERTION"), + "primaryPackagePurpose": _PURPOSES[component["type"]], + } + if version := component.get("version"): + package["versionInfo"] = version + if supplier := component.get("supplier"): + package["supplier"] = f"Organization: {supplier['name']}" + if hashes := component.get("hashes"): + package["checksums"] = [ + {"algorithm": entry["alg"].replace("-", ""), "checksumValue": entry["content"]} for entry in hashes + ] + references = component.get("externalReferences", []) + if homepage := next((reference["url"] for reference in references if reference["type"] == "website"), None): + package["homepage"] = homepage + if copyright_text := component.get("copyright"): + package["copyrightText"] = copyright_text + if description := component.get("description"): + package["summary"] = description + if comment := "\n".join( + f"{prop['name']}: {prop['value']}" + for prop in component.get("properties", []) + if prop["name"].startswith(property_prefix) + ): + package["comment"] = comment + if purl := component.get("purl"): + package["externalRefs"] = [ + {"referenceCategory": "PACKAGE-MANAGER", "referenceType": "purl", "referenceLocator": purl} + ] + if package["licenseDeclared"] == "NOASSERTION" and ( + names := [entry["license"]["name"] for entry in licenses if "license" in entry and "name" in entry["license"]] + ): + package["licenseComments"] = f"Declared in package metadata as: {'; '.join(names)}" + return package + + +def _relationship(element: str, kind: str, related: str) -> _Relationship: + return {"spdxElementId": element, "relationshipType": kind, "relatedSpdxElement": related} + + +def _spdx_id(bom_ref: str) -> str: + return f"SPDXRef-{re.sub(r'[^A-Za-z0-9.]+', '-', bom_ref).strip('-')}" + + +__all__ = [ + "Spdx", + "to_spdx", +] diff --git a/src/hatch_pep770/validate.py b/src/hatch_pep770/validate.py new file mode 100644 index 0000000..04cba3e --- /dev/null +++ b/src/hatch_pep770/validate.py @@ -0,0 +1,238 @@ +"""Check an SBOM against the CycloneDX 1.6 schema, its own references, its SPDX rendering and a license policy.""" + +from __future__ import annotations + +import json +import re +import zipfile +from typing import TYPE_CHECKING, Final + +from cyclonedx.schema import SchemaVersion +from cyclonedx.validation.json import JsonStrictValidator +from spdx_tools.spdx.parser.error import SPDXParsingError +from spdx_tools.spdx.parser.jsonlikedict.json_like_dict_parser import JsonLikeDictParser +from spdx_tools.spdx.validation.document_validator import validate_full_spdx_document + +from .spdx import to_spdx + +if TYPE_CHECKING: + from collections.abc import Iterator + from pathlib import Path + + from .cyclonedx import Component, Document, License + +_SERIAL_PATTERN: Final[re.Pattern[str]] = re.compile( + r""" + ^urn:uuid: + (?P[0-9a-f]{8})- + (?P[0-9a-f]{4})- + (?P[0-9a-f]{4})- + (?P[0-9a-f]{4})- + (?P[0-9a-f]{12}) + $ + """, + re.VERBOSE, +) +# SPDX matches operators only in upper case +_OPERATORS: Final[frozenset[str]] = frozenset({"AND", "OR", "WITH", "(", ")"}) +_TOKEN: Final[re.Pattern[str]] = re.compile(r"[()]|[^\s()]+") + + +def wheel_problems(wheel: Path, allowed_licenses: frozenset[str] | None) -> list[str]: + """ + Check every PEP 770 CycloneDX SBOM in a wheel. + + :param wheel: the wheel to read + :param allowed_licenses: SPDX license ids the shipped components may use, or ``None`` to skip the license policy + :returns: one message per problem, empty when the wheel carries at least one SBOM and every SBOM is valid + + """ + with zipfile.ZipFile(wheel) as archive: + sboms = { + name: archive.read(name).decode("utf-8") + for name in sorted(archive.namelist()) + if re.fullmatch(r"[^/]+\.dist-info/sboms/[^/]+\.cdx\.json", name) + } + if not sboms: + return ["no .dist-info/sboms/*.cdx.json found in the wheel"] + return [f"{name}: {problem}" for name, raw in sboms.items() for problem in document_problems(raw, allowed_licenses)] + + +def document_problems(raw: str, allowed_licenses: frozenset[str] | None) -> list[str]: + """ + Check one CycloneDX SBOM. + + Beyond the schema it requires the ``urn:uuid`` serial number ``actions/attest`` needs to recognize the format, + unique and resolvable ``bom-ref`` values, a root that depends on exactly the top-level components, and an SPDX 2.3 + rendering that validates. + + :param raw: the JSON text of the document + :param allowed_licenses: SPDX license ids the shipped components may use, or ``None`` to skip the license policy + :returns: one message per problem, empty when the document is valid + + """ + if schema_error := JsonStrictValidator(SchemaVersion.V1_6).validate_str(raw): + return [f"does not conform to the CycloneDX 1.6 schema: {schema_error}"] + document: Final[Document] = json.loads(raw) + if problems := _serial_problems(document.get("serialNumber", "")): + return problems + problems = _reference_problems(document) + problems += _spdx_problems(document) + if allowed_licenses is not None: + problems += license_problems(document["components"], allowed_licenses) + return problems + + +def _serial_problems(serial: str) -> list[str]: + # optional in the CycloneDX spec itself, but actions/attest's format sniffer requires it to recognize the document + # as CycloneDX at all, and silently rejects anything missing it as an unknown format + return [] if _SERIAL_PATTERN.match(serial) else [f"serialNumber must be a urn:uuid: RFC 4122 UUID, got {serial!r}"] + + +def _reference_problems(document: Document) -> list[str]: + root_ref = document["metadata"]["component"]["bom-ref"] + tools = document["metadata"]["tools"]["components"] + every_ref = list(_bom_refs([document["metadata"]["component"], *document["components"], *tools])) + if duplicates := {ref for ref in every_ref if every_ref.count(ref) > 1}: + return [f"bom-ref values are not unique: {sorted(duplicates)}"] + problems = [] + dependencies = {entry["ref"]: set(entry["dependsOn"]) for entry in document["dependencies"]} + if unknown := (set(dependencies) | set().union(*dependencies.values())) - set(every_ref): + problems.append(f"dependencies reference bom-refs that do not exist: {sorted(unknown)}") + if dependencies.get(root_ref) != (component_refs := {component["bom-ref"] for component in document["components"]}): + problems.append( + f"root dependsOn {sorted(dependencies.get(root_ref, []))} != components {sorted(component_refs)}" + ) + tool_refs = {tool["bom-ref"] for tool in tools} + problems.extend( + f"workflow {workflow['uid']} references unknown tools: {sorted(unknown)}" + for workflow in (workflow for formula in document["formulation"] for workflow in formula["workflows"]) + if (unknown := {reference["ref"] for reference in workflow["resourceReferences"]} - tool_refs) + ) + return problems + + +def _bom_refs(components: list[Component]) -> Iterator[str]: + for component in components: + yield component["bom-ref"] + yield from _bom_refs(component.get("components", [])) + + +def _spdx_problems(document: Document) -> list[str]: + try: + spdx = JsonLikeDictParser().parse(dict(to_spdx(document))) + except SPDXParsingError as error: + return [f"SPDX rendering does not parse: {message}" for message in error.get_messages()] + return [f"SPDX rendering invalid: {message.validation_message}" for message in validate_full_spdx_document(spdx)] + + +def license_problems(components: list[Component], allowed_licenses: frozenset[str]) -> list[str]: + """ + Judge the licenses of what an artifact ships against a policy. + + Only components the artifact carries bytes for are judged: a bundled wheel, or a component with files. A declared + requirement resolves at install time, and a library a bundled wheel vendors ships under that wheel's terms. + + :param components: the document's top-level components + :param allowed_licenses: SPDX license ids a shipped component may use; an expression passes when the ids it needs + are allowed, and ``WITH`` exceptions only grant extra permissions so the license they modify decides + :returns: one message per component that fails the policy + + """ + return [ + f"{component['bom-ref']}: {problem}" + for component in _shipped(components) + if (problem := _judge(component, allowed_licenses)) + ] + + +def _shipped(components: list[Component]) -> Iterator[Component]: + for component in components: + if component["type"] == "library" and ( + "hashes" in component or any(child["type"] == "file" for child in component.get("components", [])) + ): + yield component + yield from _shipped(component.get("components", [])) + + +def _judge(component: Component, allowed: frozenset[str]) -> str | None: + licenses: Final[list[License]] = component.get("licenses", []) + terms: Final[list[str]] = [ + entry["expression"] if "expression" in entry else entry["license"]["id"] + for entry in licenses + if "expression" in entry or "id" in entry["license"] + ] + if not terms: + if names := [entry["license"]["name"] for entry in licenses if "license" in entry]: + return f"declares license names {names} with no SPDX id" + return "declares no license" + try: + denied: Final[list[str]] = [term for term in terms if not _allowed(term, allowed)] + except ValueError as error: + return str(error) + if denied: + return f"license {' AND '.join(denied)} is outside the allowed licenses {sorted(allowed)}" + return None + + +def _allowed(expression: str, allowed: frozenset[str]) -> bool: + tokens: Final[list[str]] = _TOKEN.findall(expression)[::-1] + try: + verdict: Final[bool] = _any_of(tokens, allowed) + except ValueError as error: + msg = f"license expression {expression!r} is malformed: {error}" + raise ValueError(msg) from error + if tokens: + msg = f"license expression {expression!r} is malformed: unexpected {tokens[-1]!r}" + raise ValueError(msg) + return verdict + + +def _any_of(tokens: list[str], allowed: frozenset[str]) -> bool: + verdict = _all_of(tokens, allowed) + while tokens and tokens[-1] == "OR": + tokens.pop() + verdict |= _all_of(tokens, allowed) + return verdict + + +def _all_of(tokens: list[str], allowed: frozenset[str]) -> bool: + verdict = _term(tokens, allowed) + while tokens and tokens[-1] == "AND": + tokens.pop() + verdict &= _term(tokens, allowed) + return verdict + + +def _term(tokens: list[str], allowed: frozenset[str]) -> bool: + if (token := _pop(tokens)) == "(": + verdict: Final[bool] = _any_of(tokens, allowed) + if (closing := _pop(tokens)) != ")": + msg = f"expected ')', got {closing!r}" + raise ValueError(msg) + return verdict + if token in _OPERATORS: + msg = f"unexpected {token!r}" + raise ValueError(msg) + if tokens and tokens[-1] == "WITH": + tokens.pop() + # an exception grants extra permissions on top of the license it modifies, so that license alone decides + if (exception := _pop(tokens)) in _OPERATORS: + msg = f"unexpected {exception!r}" + raise ValueError(msg) + # SPDX matches license ids without regard to case + return token.casefold() in {identifier.casefold() for identifier in allowed} + + +def _pop(tokens: list[str]) -> str: + if not tokens: + msg: Final[str] = "it ends early" + raise ValueError(msg) + return tokens.pop() + + +__all__ = [ + "document_problems", + "license_problems", + "wheel_problems", +] diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..19055f8 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,137 @@ +from __future__ import annotations + +import base64 +import csv +import hashlib +import json +import zipfile +from io import StringIO +from pathlib import Path +from typing import TYPE_CHECKING, Any, Final, Protocol + +import pytest +from hatchling.builders.wheel import WheelBuilder + +if TYPE_CHECKING: + from collections.abc import Callable + + from hatch_pep770.cyclonedx import Document + + +class BundleWheel(Protocol): + def __call__(self, files: dict[str, str], metadata: str = "", name: str = "pip") -> Path: ... + + +class InstallTool(Protocol): + def __call__(self, site: Path, name: str, purelib: bool, files: dict[str, bytes]) -> None: ... + + +@pytest.fixture(autouse=True) +def _clean_environment(monkeypatch: pytest.MonkeyPatch) -> None: + monkeypatch.delenv("SOURCE_DATE_EPOCH", raising=False) + + +@pytest.fixture +def root(tmp_path: Path) -> Path: + (package := tmp_path / "project" / "src" / "example").mkdir(parents=True) + (package / "__init__.py").write_text("", encoding="utf-8") + (tmp_path / "project" / "LICENSE").write_text("Copyright (c) 2026 Example\n\nMIT terms\n", encoding="utf-8") + return tmp_path / "project" + + +@pytest.fixture +def config() -> dict[str, Any]: + return { + "project": { + "name": "Example", + "version": "1.0", + "description": "an example", + "requires-python": ">=3.9", + "license": "MIT", + "license-files": ["LICENSE"], + "maintainers": [{"name": "Maintainer", "email": "maintainer@example.com"}], + "keywords": ["sample"], + "classifiers": ["Programming Language :: Python :: 3"], + "dependencies": ["packaging>=24", "tomli>=2; python_version<'3.11'"], + "urls": {"Changelog": "https://example.com/changelog", "Source": "https://github.com/example/example"}, + }, + "tool": { + "hatch": { + "build": { + "targets": {"wheel": {"packages": ["src/example"]}}, + "hooks": {"pep770": {}}, + } + } + }, + } + + +@pytest.fixture +def build_sbom(root: Path) -> Callable[[dict[str, Any]], str]: + # drives the hook through hatchling's own wheel builder, also on hatchling releases that predate `sbom_files` + def build(config: dict[str, Any]) -> str: + builder: Final[WheelBuilder] = WheelBuilder(str(root), config=config) + build_data: Final[dict[str, Any]] = {**builder.get_default_build_data(), "sbom_files": []} + (hook,) = builder.get_build_hooks(str(root / "dist")).values() + hook.initialize("standard", build_data) + content = Path(build_data["sbom_files"][0]).read_text(encoding="utf-8") + hook.finalize("standard", build_data, str(root / "dist" / "example.whl")) + return content + + return build + + +@pytest.fixture +def build_wheel(root: Path, tmp_path: Path) -> Callable[[dict[str, Any], str], Path]: + def build(config: dict[str, Any], out: str) -> Path: + (artifact,) = WheelBuilder(str(root), config=config).build(directory=str(tmp_path / out), versions=["standard"]) + return Path(artifact) + + return build + + +@pytest.fixture +def bundle_wheel(root: Path) -> BundleWheel: + def bundle(files: dict[str, str], metadata: str = "", name: str = "pip") -> Path: + (wheels := root / "src" / "example" / "wheels").mkdir(parents=True, exist_ok=True) + record: Final[StringIO] = StringIO(newline="") + csv.writer(record).writerows([ + (f"{name}/example.py", "sha256=ungWv48Bz-pBQUDeXa4iI7ADYaOWF3qctBD_YfIAFa0", "3"), + (f"{name}-1.0.dist-info/RECORD", "", ""), + ]) + with zipfile.ZipFile(wheel := wheels / f"{name}-1.0-py3-none-any.whl", "w") as archive: + for path, content in files.items(): + archive.writestr(zipfile.ZipInfo(path), content) + archive.writestr( + zipfile.ZipInfo(f"{name}-1.0.dist-info/METADATA"), + f"Metadata-Version: 2.4\nName: {name}\nVersion: 1.0\n{metadata}", + ) + archive.writestr(zipfile.ZipInfo(f"{name}-1.0.dist-info/RECORD"), record.getvalue()) + archive.writestr(zipfile.ZipInfo(f"{name}/example.py"), b"abc") + return wheel + + return bundle + + +@pytest.fixture +def install_tool() -> InstallTool: + def install(site: Path, name: str, purelib: bool, files: dict[str, bytes]) -> None: + record: Final[StringIO] = StringIO(newline="") + for path, content in files.items(): + (target := site / path).parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(content) + digest = base64.urlsafe_b64encode(hashlib.sha256(content).digest()).rstrip(b"=").decode() + csv.writer(record).writerow((path, f"sha256={digest}", len(content))) + (dist_info := site / f"{name}-1.0.dist-info").mkdir(exist_ok=True) + (dist_info / "METADATA").write_text(f"Metadata-Version: 2.4\nName: {name}\nVersion: 1.0\n", encoding="utf-8") + (dist_info / "WHEEL").write_text( + f"Wheel-Version: 1.0\nRoot-Is-Purelib: {str(purelib).lower()}\n", encoding="utf-8" + ) + (dist_info / "RECORD").write_bytes(record.getvalue().encode()) + + return install + + +@pytest.fixture +def sbom_document(build_sbom: Callable[[dict[str, Any]], str], config: dict[str, Any]) -> Document: + return json.loads(build_sbom(config)) diff --git a/tests/test___main__.py b/tests/test___main__.py new file mode 100644 index 0000000..0469465 --- /dev/null +++ b/tests/test___main__.py @@ -0,0 +1,62 @@ +from __future__ import annotations + +import json +import sys +import zipfile +from typing import TYPE_CHECKING + +import pytest + +from hatch_pep770.__main__ import main +from hatch_pep770.spdx import to_spdx + +if TYPE_CHECKING: + from pathlib import Path + + from hatch_pep770.cyclonedx import Document + + +@pytest.fixture +def wheel(sbom_document: Document, tmp_path: Path) -> Path: + (dist := tmp_path / "dist").mkdir() + with zipfile.ZipFile(path := dist / "example-1.0-py3-none-any.whl", "w") as archive: + archive.writestr("example-1.0.dist-info/sboms/example.cdx.json", json.dumps(sbom_document)) + return path + + +def test_main_spdx(sbom_document: Document, tmp_path: Path) -> None: + (source := tmp_path / "example.cdx.json").write_text(json.dumps(sbom_document), encoding="utf-8") + assert (main(["spdx", str(source), str(target := tmp_path / "example.spdx.json")]), target.read_bytes()) == ( + 0, + f"{json.dumps(to_spdx(sbom_document), indent=2)}\n".encode(), + ) + + +@pytest.mark.parametrize( + "target", [pytest.param("example-1.0-py3-none-any.whl", id="wheel"), pytest.param(".", id="directory")] +) +def test_main_validate(wheel: Path, capsys: pytest.CaptureFixture[str], target: str) -> None: + assert (main(["validate", str(wheel.parent / target), "--allow-license", "MIT"]), capsys.readouterr().out) == ( + 0, + "SBOM in example-1.0-py3-none-any.whl is valid\n", + ) + + +def test_main_validate_problems(tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None: + with zipfile.ZipFile(wheel := tmp_path / "example-1.0-py3-none-any.whl", "w") as archive: + archive.writestr("example-1.0.dist-info/METADATA", "Name: example\n") + assert (main(["validate", str(wheel)]), capsys.readouterr().err) == ( + 1, + "SBOM invalid: example-1.0-py3-none-any.whl: no .dist-info/sboms/*.cdx.json found in the wheel\n", + ) + + +def test_main_validate_no_wheel(tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None: + assert (main(["validate", str(tmp_path)]), capsys.readouterr().err) == (1, f"no wheel found in {tmp_path}\n") + + +def test_main_module(monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]) -> None: + monkeypatch.setattr(sys, "argv", ["hatch-pep770", "--help"]) + with pytest.raises(SystemExit): + main() + assert "usage: hatch-pep770" in capsys.readouterr().out diff --git a/tests/test_plugin.py b/tests/test_plugin.py new file mode 100644 index 0000000..52f91d4 --- /dev/null +++ b/tests/test_plugin.py @@ -0,0 +1,829 @@ +from __future__ import annotations + +import csv +import hashlib +import json +import os +import subprocess +import sys +import zipfile +from io import StringIO +from pathlib import Path +from typing import TYPE_CHECKING, Any, Final + +import pytest +from hatchling.builders.sdist import SdistBuilder +from hatchling.builders.wheel import WheelBuilder + +from hatch_pep770.validate import wheel_problems + +if TYPE_CHECKING: + from collections.abc import Callable + + from pytest_mock import MockerFixture + + from hatch_pep770.cyclonedx import Component, Document, Workflow + from tests.conftest import BundleWheel, InstallTool + +_BUNDLED: Final[str] = "src/example/wheels/*.whl" +_URLS: Final[dict[str, str]] = {"Source": "https://github.com/example/example"} + + +@pytest.mark.skipif(sys.version_info < (3, 10), reason="hatchling 1.28 needs Python 3.10") +def test_wheel_embeds_sbom( + build_wheel: Callable[[dict[str, Any], str], Path], config: dict[str, Any] +) -> None: # pragma: >=3.10 cover + with zipfile.ZipFile(build_wheel(config, "dist")) as archive: + names: Final[list[str]] = archive.namelist() + record: Final[str] = archive.read("example-1.0.dist-info/RECORD").decode("utf-8") + assert ("example-1.0.dist-info/sboms/example.cdx.json" in names, "sboms/example.cdx.json," in record) == ( + True, + True, + ) + + +@pytest.mark.skipif(sys.version_info < (3, 10), reason="hatchling 1.28 needs Python 3.10") +def test_wheel_sbom_valid( + build_wheel: Callable[[dict[str, Any], str], Path], + bundle_wheel: BundleWheel, + config: dict[str, Any], +) -> None: # pragma: >=3.10 cover + bundle_wheel({"pip/_vendor/vendor.txt": "urllib3==1.26.4\n"}, "License-Expression: MIT\n") + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + assert wheel_problems(build_wheel(config, "dist"), frozenset({"MIT"})) == [] + + +@pytest.mark.skipif(sys.version_info < (3, 10), reason="hatchling 1.28 needs Python 3.10") +def test_wheel_reproducible( + build_wheel: Callable[[dict[str, Any], str], Path], config: dict[str, Any] +) -> None: # pragma: >=3.10 cover + assert build_wheel(config, "first").read_bytes() == build_wheel(config, "second").read_bytes() + + +@pytest.mark.skipif(sys.version_info >= (3, 10), reason="Python 3.10 and later get hatchling 1.28") +def test_wheel_old_hatchling( + build_wheel: Callable[[dict[str, Any], str], Path], config: dict[str, Any], capsys: pytest.CaptureFixture[str] +) -> None: # pragma: <3.10 cover + with zipfile.ZipFile(build_wheel(config, "dist")) as archive: + sboms: Final[list[str]] = [name for name in archive.namelist() if "/sboms/" in name] + assert (sboms, "cannot embed SBOMs" in capsys.readouterr().err) == ([], True) + + +def test_sdist_target_skipped(root: Path, config: dict[str, Any], capsys: pytest.CaptureFixture[str]) -> None: + (artifact,) = SdistBuilder(str(root), config=config).build(directory=str(root / "dist")) + assert (Path(artifact).name, capsys.readouterr().err) == ("example-1.0.tar.gz", "") + + +def test_root_component(sbom_document: Document) -> None: + attestation: Final[str] = "https://pypi.org/integrity/example/1.0/example-1.0-py3-none-any.whl/provenance" + assert sbom_document["metadata"]["component"] == { + "type": "application", + "bom-ref": "pkg:pypi/example@1.0", + "authors": [{"name": "Maintainer", "email": "maintainer@example.com"}], + "name": "example", + "version": "1.0", + "description": "an example", + "licenses": [{"expression": "MIT", "acknowledgement": "declared"}], + "copyright": "Copyright (c) 2026 Example", + "purl": "pkg:pypi/example@1.0", + "externalReferences": [ + {"type": "release-notes", "url": "https://example.com/changelog", "comment": "Project-URL: Changelog"}, + {"type": "vcs", "url": "https://github.com/example/example", "comment": "Project-URL: Source"}, + {"type": "distribution", "url": "https://pypi.org/project/example/1.0/"}, + {"type": "attestation", "url": attestation}, + {"type": "security-contact", "url": "https://github.com/example/example/security/policy"}, + {"type": "advisories", "url": "https://github.com/example/example/security/advisories"}, + {"type": "license", "url": "https://github.com/example/example/blob/main/LICENSE"}, + ], + "properties": [ + {"name": "example:requires-python", "value": ">=3.9"}, + {"name": "python:classifier", "value": "Programming Language :: Python :: 3"}, + {"name": "python:keyword", "value": "sample"}, + ], + } + + +def test_root_component_minimal_metadata( + root: Path, build_sbom: Callable[[dict[str, Any]], str], config: dict[str, Any] +) -> None: + (root / "LICENSE").write_text("MIT terms\n", encoding="utf-8") + config["project"] = { + "name": "example", + "version": "1.0", + "license-files": ["LICENSE"], + "authors": [{"name": "Author"}], + } + assert json.loads(build_sbom(config))["metadata"]["component"] == { + "type": "application", + "bom-ref": "pkg:pypi/example@1.0", + "authors": [{"name": "Author"}], + "name": "example", + "version": "1.0", + "purl": "pkg:pypi/example@1.0", + "externalReferences": [ + {"type": "distribution", "url": "https://pypi.org/project/example/1.0/"}, + { + "type": "attestation", + "url": "https://pypi.org/integrity/example/1.0/example-1.0-py2.py3-none-any.whl/provenance", + }, + ], + "properties": [], + } + + +def test_document_metadata(sbom_document: Document) -> None: + assert {key: value for key, value in sbom_document["metadata"].items() if key not in {"tools", "component"}} == { + "timestamp": "2020-02-02T00:00:00+00:00", + "lifecycles": [{"phase": "build"}], + "authors": [{"name": "Maintainer", "email": "maintainer@example.com"}], + "licenses": [{"expression": "MIT", "acknowledgement": "declared"}], + "properties": [ + { + "name": "example:sbom:scope", + "value": "Components are the direct runtime dependencies declared in the wheel's core metadata. They" + " carry no version because they are resolved at install time, not at build time.", + } + ], + } + + +def test_supplier(build_sbom: Callable[[dict[str, Any]], str], config: dict[str, Any]) -> None: + supplier: Final[dict[str, Any]] = {"name": "Example Org", "url": ["https://example.org"]} + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"supplier": supplier} + document: Final[dict[str, Any]] = json.loads(build_sbom(config)) + assert [ + document["metadata"]["manufacturer"], + document["metadata"]["supplier"], + document["metadata"]["component"]["supplier"], + ] == [supplier] * 3 + + +def test_declared_dependencies(sbom_document: Document) -> None: + assert (sbom_document["components"], sbom_document["dependencies"][0]) == ( + [ + { + "type": "library", + "bom-ref": "requires-dist:packaging>=24", + "name": "packaging", + "purl": "pkg:pypi/packaging", + "externalReferences": [{"type": "distribution", "url": "https://pypi.org/project/packaging/"}], + "properties": [{"name": "example:requires-dist", "value": "packaging>=24"}], + }, + { + "type": "library", + "bom-ref": "requires-dist:tomli>=2; python_version < '3.11'", + "name": "tomli", + "purl": "pkg:pypi/tomli", + "externalReferences": [{"type": "distribution", "url": "https://pypi.org/project/tomli/"}], + "properties": [ + {"name": "example:requires-dist", "value": "tomli>=2; python_version < '3.11'"}, + {"name": "example:environment-marker", "value": 'python_version < "3.11"'}, + ], + }, + ], + { + "ref": "pkg:pypi/example@1.0", + "dependsOn": ["requires-dist:packaging>=24", "requires-dist:tomli>=2; python_version < '3.11'"], + }, + ) + + +def test_composition_incomplete(sbom_document: Document) -> None: + assert sbom_document["compositions"] == [{"aggregate": "incomplete", "dependencies": ["pkg:pypi/example@1.0"]}] + + +def test_build_workflow(sbom_document: Document) -> None: + workflow: Final[Workflow] = sbom_document["formulation"][0]["workflows"][0] + assert {**workflow, "resourceReferences": len(workflow["resourceReferences"])} == { + "bom-ref": "workflow:wheel-build", + "uid": "wheel-build", + "name": "build the wheel and this SBOM", + "taskTypes": ["build"], + "resourceReferences": len(sbom_document["metadata"]["tools"]["components"]), + "outputs": [{"type": "artifact", "resource": {"ref": "pkg:pypi/example@1.0"}}], + "inputs": [{"environmentVars": [{"name": "SOURCE_DATE_EPOCH", "value": "1580601600"}]}], + } + + +def test_build_tools_name_interpreter_and_hook(sbom_document: Document) -> None: + tools: Final[list[Component]] = sbom_document["metadata"]["tools"]["components"] + assert (tools[0]["type"], any(tool["name"] == "hatch-pep770" for tool in tools)) == ("platform", True) + + +def test_bundled_wheel( + build_sbom: Callable[[dict[str, Any]], str], bundle_wheel: BundleWheel, config: dict[str, Any] +) -> None: + wheel: Final[Path] = bundle_wheel({}, "License-Expression: MIT\n") + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + sha256: Final[str] = hashlib.sha256(wheel.read_bytes()).hexdigest() + assert json.loads(build_sbom(config))["components"][0] == { + "type": "library", + "bom-ref": "pkg:pypi/pip@1.0", + "name": "pip", + "version": "1.0", + "purl": "pkg:pypi/pip@1.0", + "licenses": [{"expression": "MIT", "acknowledgement": "declared"}], + "externalReferences": [{"type": "distribution", "url": "https://pypi.org/project/pip/1.0/"}], + "properties": [{"name": "example:bundled-wheel", "value": "src/example/wheels/pip-1.0-py3-none-any.whl"}], + "hashes": [{"alg": "SHA-256", "content": sha256}], + "evidence": { + "identity": [ + { + "field": "purl", + "confidence": 1, + "methods": [ + {"technique": "manifest-analysis", "confidence": 1, "value": "pip-1.0.dist-info/METADATA"} + ], + }, + { + "field": "hash", + "confidence": 1, + "methods": [{"technique": "hash-comparison", "confidence": 1, "value": sha256}], + }, + ] + }, + "components": [ + { + "type": "file", + "bom-ref": "pkg:pypi/pip@1.0#pip/example.py", + "name": "pip/example.py", + "hashes": [ + {"alg": "SHA-256", "content": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"} + ], + "properties": [{"name": "size", "value": "3"}], + } + ], + } + + +def test_bundled_wheel_scope( + build_sbom: Callable[[dict[str, Any]], str], bundle_wheel: BundleWheel, config: dict[str, Any] +) -> None: + bundle_wheel({}) + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + assert json.loads(build_sbom(config))["metadata"]["properties"] == [ + { + "name": "example:sbom:scope", + "value": "Components are the wheels bundled as data files under src/example/wheels and the direct runtime" + " dependencies declared in the wheel's core metadata. The latter carry no version because they are" + " resolved at install time, not at build time.", + } + ] + + +def test_bundled_wheels_sorted_and_first( + build_sbom: Callable[[dict[str, Any]], str], bundle_wheel: BundleWheel, config: dict[str, Any] +) -> None: + bundle_wheel({}, name="setuptools") + bundle_wheel({}, name="pip") + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED, "src/example/wheels/pip-*"]} + document: Final[dict[str, Any]] = json.loads(build_sbom(config)) + assert document["dependencies"][0]["dependsOn"] == [ + "pkg:pypi/pip@1.0", + "pkg:pypi/setuptools@1.0", + "requires-dist:packaging>=24", + "requires-dist:tomli>=2; python_version < '3.11'", + ] + + +@pytest.mark.parametrize( + ("source", "urls", "expected"), + [ + pytest.param("https://github.com/example/pip", _URLS, True, id="same-account"), + pytest.param("https://github.com/other/pip", _URLS, False, id="other-account"), + pytest.param("https://github.com/example/pip", {}, False, id="no-repository"), + ], +) +def test_bundled_wheel_supplier( + build_sbom: Callable[[dict[str, Any]], str], + bundle_wheel: BundleWheel, + config: dict[str, Any], + source: str, + urls: dict[str, str], + expected: bool, +) -> None: + bundle_wheel({}, f"Project-URL: Source, {source}\n") + config["project"]["urls"] = urls + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = { + "bundled-wheels": [_BUNDLED], + "supplier": {"name": "Example Org"}, + } + assert ("supplier" in json.loads(build_sbom(config))["components"][0]) is expected + + +@pytest.mark.parametrize( + "filename", + [ + pytest.param("pip/example.py", id="plain"), + pytest.param("pip/a,b.py", id="comma"), + pytest.param('pip/a"b.py', id="quote"), + pytest.param("pip/a\nb.py", id="newline"), + ], +) +def test_bundled_wheel_record_paths( + root: Path, build_sbom: Callable[[dict[str, Any]], str], config: dict[str, Any], filename: str +) -> None: + record: Final[StringIO] = StringIO(newline="") + csv.writer(record).writerows([ + (filename, "sha256=ungWv48Bz-pBQUDeXa4iI7ADYaOWF3qctBD_YfIAFa0", "3"), + ("pip-1.0.dist-info/RECORD", "", ""), + ]) + (wheels := root / "src" / "example" / "wheels").mkdir(parents=True) + with zipfile.ZipFile(wheels / "pip-1.0-py3-none-any.whl", "w") as archive: + archive.writestr("pip-1.0.dist-info/METADATA", "Metadata-Version: 2.4\nName: pip\nVersion: 1.0\n") + archive.writestr("pip-1.0.dist-info/RECORD", record.getvalue()) + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + assert json.loads(build_sbom(config))["components"][0]["components"] == [ + { + "type": "file", + "bom-ref": f"pkg:pypi/pip@1.0#{filename}", + "name": filename, + "hashes": [ + {"alg": "SHA-256", "content": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"} + ], + "properties": [{"name": "size", "value": "3"}], + }, + ] + + +@pytest.mark.parametrize( + ("source", "content"), + [ + pytest.param( + "pip/_vendor/vendor.txt", "# bundled\n\n urllib3==1.26.4 # patched upstream\n", id="pip-manifest" + ), + pytest.param( + "pip/_vendor/urllib3-1.26.4.dist-info/METADATA", "Name: urllib3\nVersion: 1.26.4\n", id="nested-metadata" + ), + ], +) +def test_vendored_identity( + build_sbom: Callable[[dict[str, Any]], str], + bundle_wheel: BundleWheel, + config: dict[str, Any], + source: str, + content: str, +) -> None: + bundle_wheel({source: content}) + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + document: Final[dict[str, Any]] = json.loads(build_sbom(config)) + assert [child for child in document["components"][0]["components"] if child["type"] == "library"] == [ + { + "type": "library", + "bom-ref": "pkg:pypi/pip@1.0#vendored/pkg:pypi/urllib3@1.26.4", + "name": "urllib3", + "version": "1.26.4", + "purl": "pkg:pypi/urllib3@1.26.4", + "externalReferences": [], + "properties": [{"name": "example:vendored-manifest", "value": source}], + "evidence": { + "identity": [ + { + "field": "purl", + "confidence": 1, + "methods": [{"technique": "manifest-analysis", "confidence": 1, "value": source}], + } + ] + }, + } + ] + + +def test_vendored_relationship( + build_sbom: Callable[[dict[str, Any]], str], bundle_wheel: BundleWheel, config: dict[str, Any] +) -> None: + bundle_wheel({"pip/_vendor/vendor.txt": "urllib3==1.26.4\n"}) + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + assert json.loads(build_sbom(config))["dependencies"][1] == { + "ref": "pkg:pypi/pip@1.0", + "dependsOn": ["pkg:pypi/pip@1.0#vendored/pkg:pypi/urllib3@1.26.4"], + } + + +def test_vendored_metadata_precedence( + build_sbom: Callable[[dict[str, Any]], str], bundle_wheel: BundleWheel, config: dict[str, Any] +) -> None: + bundle_wheel({ + "pip/_vendor/vendor.txt": "urllib3==1.26.4\n", + "pip/_vendor/urllib3-1.26.4.dist-info/METADATA": "Name: urllib3\nVersion: 1.26.4\nLicense-Expression: MIT\n", + }) + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + document: Final[dict[str, Any]] = json.loads(build_sbom(config)) + assert [child["licenses"] for child in document["components"][0]["components"] if child["type"] == "library"] == [ + [{"expression": "MIT", "acknowledgement": "declared"}], + ] + + +@pytest.mark.parametrize( + "requirement", + [ + pytest.param("urllib3", id="missing"), + pytest.param("urllib3>=1", id="range"), + pytest.param("urllib3==1.*", id="wildcard"), + pytest.param("urllib3 @ https://example.com/package.whl", id="url"), + ], +) +def test_vendored_unpinned_rejected( + build_sbom: Callable[[dict[str, Any]], str], bundle_wheel: BundleWheel, config: dict[str, Any], requirement: str +) -> None: + bundle_wheel({"pip/_vendor/vendor.txt": requirement}) + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + with pytest.raises(ValueError, match="Unpinned vendored dependency"): + build_sbom(config) + + +@pytest.mark.parametrize( + ("metadata", "expected"), + [ + pytest.param( + "Classifier: License :: OSI Approved :: MIT License\n", + [ + {"license": {"name": "MIT License", "acknowledgement": "declared"}}, + {"license": {"id": "MIT", "acknowledgement": "concluded"}}, + ], + id="classifier", + ), + pytest.param( + "Classifier: License :: OSI Approved :: Python Software Foundation License\nLicense: PSF-2.0\n", + [ + {"license": {"name": "Python Software Foundation License", "acknowledgement": "declared"}}, + {"license": {"name": "PSF-2.0", "acknowledgement": "declared"}}, + {"license": {"id": "PSF-2.0", "acknowledgement": "concluded"}}, + ], + id="classifier-and-id-agree", + ), + pytest.param( + "License: mit\n", + [ + {"license": {"name": "mit", "acknowledgement": "declared"}}, + {"license": {"id": "MIT", "acknowledgement": "concluded"}}, + ], + id="id-canonical-case", + ), + pytest.param( + "Classifier: License :: OSI Approved :: MIT License\n" + "Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)\n", + [ + {"license": {"name": "MIT License", "acknowledgement": "declared"}}, + {"license": {"name": "GNU Lesser General Public License v3 (LGPLv3)", "acknowledgement": "declared"}}, + ], + id="one-unresolved", + ), + pytest.param( + "License: MIT OR Apache-2.0\n", + [{"license": {"name": "MIT OR Apache-2.0", "acknowledgement": "declared"}}], + id="expression-in-license-field", + ), + pytest.param( + "License: LicenseRef-Proprietary\n", + [{"license": {"name": "LicenseRef-Proprietary", "acknowledgement": "declared"}}], + id="license-ref", + ), + ], +) +def test_license_resolution( + build_sbom: Callable[[dict[str, Any]], str], + bundle_wheel: BundleWheel, + config: dict[str, Any], + metadata: str, + expected: list[dict[str, Any]], +) -> None: + bundle_wheel({}, metadata) + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + assert json.loads(build_sbom(config))["components"][0]["licenses"] == expected + + +def test_bundled_wheel_metadata_fields( + build_sbom: Callable[[dict[str, Any]], str], bundle_wheel: BundleWheel, config: dict[str, Any] +) -> None: + bundle_wheel( + {}, + "Summary: installer\nHome-page: https://pip.pypa.io\nAuthor: Someone\nAuthor-email: dev@example.com\n" + "Maintainer-email: Team <>\nProject-URL: Bug Tracker, https://example.com/issues\n", + ) + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + component: Final[dict[str, Any]] = json.loads(build_sbom(config))["components"][0] + assert {key: component[key] for key in ("description", "authors", "externalReferences")} == { + "description": "installer", + "authors": [{"name": "Someone"}, {"email": "dev@example.com"}, {"name": "Team"}], + "externalReferences": [ + {"type": "website", "url": "https://pip.pypa.io"}, + {"type": "issue-tracker", "url": "https://example.com/issues", "comment": "Project-URL: Bug Tracker"}, + {"type": "distribution", "url": "https://pypi.org/project/pip/1.0/"}, + ], + } + + +@pytest.mark.parametrize( + ("environment", "expected"), + [ + pytest.param({}, ("2020-02-02T00:00:00+00:00", "1580601600"), id="hatchling-default"), + pytest.param( + {"SOURCE_DATE_EPOCH": "1700000000"}, ("2023-11-14T22:13:20+00:00", "1700000000"), id="source-date-epoch" + ), + ], +) +def test_timestamp( + build_sbom: Callable[[dict[str, Any]], str], + config: dict[str, Any], + mocker: MockerFixture, + environment: dict[str, str], + expected: tuple[str, str], +) -> None: + mocker.patch.dict(os.environ, environment) + document: Final[dict[str, Any]] = json.loads(build_sbom(config)) + workflow: Final[dict[str, Any]] = document["formulation"][0]["workflows"][0] + assert (document["metadata"]["timestamp"], workflow["inputs"][0]["environmentVars"][0]["value"]) == expected + + +def test_build_host_independent( + build_sbom: Callable[[dict[str, Any]], str], + config: dict[str, Any], + install_tool: InstallTool, + mocker: MockerFixture, + tmp_path: Path, +) -> None: + sboms: Final[list[str]] = [] + for host, extension, installer, sys_version in ( + ( + { + "system": "Linux", + "release": "6.17.0-1022-azure", + "version": "#22~24.04.1-Ubuntu SMP", + "machine": "x86_64", + "platform": "Linux-6.17.0-1022-azure-x86_64-with-glibc2.39", + "python_compiler": "GCC 13.3.0", + "python_build": ("main", "Aug 5 2026 10:00:00"), + }, + "cpython-314-x86_64-linux-gnu.so", + b"uv\n", + "3.14.7 (main, Aug 5 2026, 10:00:00) [GCC 13.3.0]", + ), + ( + { + "system": "Linux", + "release": "7.0.12-linuxkit", + "version": "#1 SMP PREEMPT", + "machine": "aarch64", + "platform": "Linux-7.0.12-linuxkit-aarch64-with-glibc2.36", + "python_compiler": "Clang 20.1.4", + "python_build": ("main", "Sep 1 2026 08:00:00"), + }, + "cpython-314-aarch64-linux-gnu.so", + b"pip\n", + "3.14.7 (main, Sep 1 2026, 08:00:00) [Clang 20.1.4]", + ), + ): + for name, value in host.items(): + mocker.patch(f"platform.{name}", autospec=True, return_value=value) + mocker.patch.object(sys, "version", sys_version) + install_tool(site := tmp_path / extension, "native", False, {f"native/_speedups.{extension}": b"\0"}) + install_tool(site, "pure", True, {"pure-1.0.dist-info/INSTALLER": installer, "pure/__init__.py": b""}) + mocker.patch.object(sys, "path", [str(site), *sys.path]) + sboms.append(build_sbom(config)) + mocker.stopall() + assert sboms[0] == sboms[1] + + +def test_build_tools_pure_files( + build_sbom: Callable[[dict[str, Any]], str], + config: dict[str, Any], + install_tool: InstallTool, + mocker: MockerFixture, + tmp_path: Path, +) -> None: + install_tool( + site := tmp_path / "site", + "pure", + True, + {"pure-1.0.dist-info/INSTALLER": b"uv\n", "pure/__init__.py": b"", "../../bin/pure": b"#!python\n"}, + ) + install_tool(site, "native", False, {"native/_speedups.so": b"\0"}) + mocker.patch.object(sys, "path", [str(site), *sys.path]) + tools: Final[dict[str, dict[str, Any]]] = { + tool["name"]: tool for tool in json.loads(build_sbom(config))["metadata"]["tools"]["components"] + } + assert ([file["name"] for file in tools["pure"]["components"]], "components" in tools["native"]) == ( + ["pure/__init__.py"], + False, + ) + + +def test_ci_rerun( + build_sbom: Callable[[dict[str, Any]], str], config: dict[str, Any], monkeypatch: pytest.MonkeyPatch +) -> None: + monkeypatch.setenv("GITHUB_SHA", "a" * 40) + monkeypatch.setenv("GITHUB_RUN_ID", "100") + first: Final[str] = build_sbom(config) + monkeypatch.setenv("GITHUB_SHA", "b" * 40) + monkeypatch.setenv("GITHUB_RUN_ID", "200") + assert build_sbom(config) == first + + +def test_source_revision( + root: Path, build_sbom: Callable[[dict[str, Any]], str], config: dict[str, Any], monkeypatch: pytest.MonkeyPatch +) -> None: + for name in ("GIT_AUTHOR_NAME", "GIT_COMMITTER_NAME"): + monkeypatch.setenv(name, "Example") + for name in ("GIT_AUTHOR_EMAIL", "GIT_COMMITTER_EMAIL"): + monkeypatch.setenv(name, "example@example.com") + for command in (["init", "-q"], ["add", "."], ["commit", "-q", "--no-gpg-sign", "-m", "init"]): + subprocess.run(["git", *command], cwd=root, check=True) + commit: Final[str] = subprocess.run( + ["git", "rev-parse", "HEAD"], cwd=root, check=True, capture_output=True, text=True + ).stdout.strip() + component: Final[dict[str, Any]] = json.loads(build_sbom(config))["metadata"]["component"] + assert (component["externalReferences"][-1], component["properties"][-1]) == ( + {"type": "vcs", "url": f"https://github.com/example/example/tree/{commit}", "comment": "exact source revision"}, + {"name": "example:vcs-commit", "value": commit}, + ) + + +def test_source_revision_without_repository( + root: Path, build_sbom: Callable[[dict[str, Any]], str], config: dict[str, Any], mocker: MockerFixture +) -> None: + (root / ".git").mkdir() + mocker.patch( + "subprocess.run", + autospec=True, + return_value=subprocess.CompletedProcess(["git"], 0, stdout="c0ffee\n", stderr=""), + ) + del config["project"]["urls"] + component: Final[dict[str, Any]] = json.loads(build_sbom(config))["metadata"]["component"] + assert ([ref["type"] for ref in component["externalReferences"]], component["properties"][-1]) == ( + ["distribution", "attestation"], + {"name": "example:vcs-commit", "value": "c0ffee"}, + ) + + +def test_source_revision_unreadable( + root: Path, + build_sbom: Callable[[dict[str, Any]], str], + config: dict[str, Any], + mocker: MockerFixture, + capsys: pytest.CaptureFixture[str], +) -> None: + (root / ".git").mkdir() + mocker.patch( + "subprocess.run", + autospec=True, + side_effect=subprocess.CalledProcessError(128, ["git"], stderr="fatal: detected dubious ownership"), + ) + component: Final[dict[str, Any]] = json.loads(build_sbom(config))["metadata"]["component"] + assert ( + [prop["name"] for prop in component["properties"]], + "names no source revision: fatal: detected dubious ownership" in capsys.readouterr().err, + ) == (["example:requires-python", "python:classifier", "python:keyword"], True) + + +@pytest.mark.parametrize( + ("hook_config", "expected"), + [ + pytest.param( + {"repository": "https://gitlab.com/example/example/"}, + [ + {"type": "release-notes", "url": "https://example.com/changelog", "comment": "Project-URL: Changelog"}, + {"type": "vcs", "url": "https://github.com/example/example", "comment": "Project-URL: Source"}, + {"type": "distribution", "url": "https://pypi.org/project/example/1.0/"}, + {"type": "license", "url": "https://gitlab.com/example/example/blob/main/LICENSE"}, + ], + id="repository-off-github", + ), + pytest.param( + {"default-branch": "trunk"}, + [ + {"type": "release-notes", "url": "https://example.com/changelog", "comment": "Project-URL: Changelog"}, + {"type": "vcs", "url": "https://github.com/example/example", "comment": "Project-URL: Source"}, + {"type": "distribution", "url": "https://pypi.org/project/example/1.0/"}, + {"type": "security-contact", "url": "https://github.com/example/example/security/policy"}, + {"type": "advisories", "url": "https://github.com/example/example/security/advisories"}, + {"type": "license", "url": "https://github.com/example/example/blob/trunk/LICENSE"}, + ], + id="default-branch", + ), + ], +) +def test_repository_links( + build_sbom: Callable[[dict[str, Any]], str], + config: dict[str, Any], + hook_config: dict[str, Any], + expected: list[dict[str, str]], +) -> None: + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = hook_config + references: Final[list[dict[str, str]]] = json.loads(build_sbom(config))["metadata"]["component"][ + "externalReferences" + ] + assert [reference for reference in references if reference["type"] != "attestation"] == expected + + +def test_serial_number_per_project(build_sbom: Callable[[dict[str, Any]], str], config: dict[str, Any]) -> None: + first: Final[str] = json.loads(build_sbom(config))["serialNumber"] + del config["project"]["urls"] + assert json.loads(build_sbom(config))["serialNumber"] != first + + +@pytest.mark.parametrize( + ("build_data", "tag"), + [ + pytest.param({"tag": "py3-none-linux_x86_64"}, "py3-none-linux_x86_64", id="set-by-another-hook"), + pytest.param({"infer_tag": True}, None, id="inferred"), + ], +) +def test_attestation_wheel_tag(root: Path, config: dict[str, Any], build_data: dict[str, Any], tag: str | None) -> None: + builder: Final[WheelBuilder] = WheelBuilder(str(root), config=config) + data: Final[dict[str, Any]] = {**builder.get_default_build_data(), "sbom_files": [], **build_data} + (hook,) = builder.get_build_hooks(str(root / "dist")).values() + hook.initialize("standard", data) + references: Final[list[dict[str, str]]] = json.loads(Path(data["sbom_files"][0]).read_text(encoding="utf-8"))[ + "metadata" + ]["component"]["externalReferences"] + expected: Final[str] = tag or builder.get_best_matching_tag() + assert [ref["url"] for ref in references if ref["type"] == "attestation"] == [ + f"https://pypi.org/integrity/example/1.0/example-1.0-{expected}.whl/provenance" + ] + + +def test_finalize_removes_sbom(root: Path, config: dict[str, Any]) -> None: + builder: Final[WheelBuilder] = WheelBuilder(str(root), config=config) + build_data: Final[dict[str, Any]] = {**builder.get_default_build_data(), "sbom_files": []} + (hook,) = builder.get_build_hooks(str(root / "dist")).values() + hook.initialize("standard", build_data) + hook.finalize("standard", build_data, "") + assert Path(build_data["sbom_files"][0]).parent.exists() is False + + +@pytest.mark.parametrize( + ("hook_config", "message"), + [ + pytest.param( + {"supplier": "Example"}, "Option `supplier` of build hook `pep770` must be a table", id="supplier" + ), + pytest.param({"supplier": {"name": "Example", "email": "x"}}, "Option `supplier`", id="supplier-unknown-key"), + pytest.param({"repository": 1}, "Option `repository` of build hook `pep770` must be a string", id="repository"), + pytest.param( + {"default-branch": 1}, "Option `default-branch` of build hook `pep770` must be a string", id="branch" + ), + pytest.param( + {"bundled-wheels": "*.whl"}, + "Option `bundled-wheels` of build hook `pep770` must be an array of strings", + id="bundled-wheels", + ), + ], +) +def test_invalid_option( + build_sbom: Callable[[dict[str, Any]], str], config: dict[str, Any], hook_config: dict[str, Any], message: str +) -> None: + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = hook_config + with pytest.raises(TypeError, match=message): + build_sbom(config) + + +@pytest.mark.parametrize( + ("urls", "references"), + [ + pytest.param( + _URLS, + { + "externalReferences": [ + {"type": "vcs", "url": "https://github.com/example/example/blob/main/hatch_build.py"} + ] + }, + id="repository", + ), + pytest.param({}, {}, id="no-repository"), + ], +) +def test_custom_hook_subclass( + root: Path, + build_sbom: Callable[[dict[str, Any]], str], + bundle_wheel: BundleWheel, + config: dict[str, Any], + urls: dict[str, str], + references: dict[str, Any], +) -> None: + bundle_wheel({}) + (script := root / "hatch_build.py").write_text( + "from __future__ import annotations\n\nfrom hatch_pep770 import plugin\n\n\n" + "class Hook(plugin.Pep770BuildHook):\n" + " def bundled_wheel_properties(self, wheel):\n" + ' return [{"name": "example:installed-for-python", "value": wheel.name}]\n\n\n' + "def get_build_hook():\n return Hook\n", + encoding="utf-8", + ) + config["project"]["urls"] = urls + config["tool"]["hatch"]["build"]["hooks"] = {"custom": {"bundled-wheels": [_BUNDLED]}} + document: Final[dict[str, Any]] = json.loads(build_sbom(config)) + assert (document["metadata"]["tools"]["components"][0], document["components"][0]["properties"][:2]) == ( + { + "type": "application", + "bom-ref": "tool:hatch_build.py", + "name": "hatch_build.py", + "version": "1.0", + "hashes": [{"alg": "SHA-256", "content": hashlib.sha256(script.read_bytes()).hexdigest()}], + **references, + }, + [ + {"name": "example:bundled-wheel", "value": "src/example/wheels/pip-1.0-py3-none-any.whl"}, + {"name": "example:installed-for-python", "value": "pip-1.0-py3-none-any.whl"}, + ], + ) diff --git a/tests/test_spdx.py b/tests/test_spdx.py new file mode 100644 index 0000000..e72aeab --- /dev/null +++ b/tests/test_spdx.py @@ -0,0 +1,205 @@ +from __future__ import annotations + +import json +from typing import TYPE_CHECKING, Any, Final + +import pytest + +from hatch_pep770.spdx import to_spdx +from hatch_pep770.version import __version__ + +if TYPE_CHECKING: + from collections.abc import Callable + from pathlib import Path + + from hatch_pep770.cyclonedx import Document + from tests.conftest import BundleWheel + +_BUNDLED: Final[str] = "src/example/wheels/*.whl" + + +@pytest.fixture +def bundled_config(bundle_wheel: BundleWheel, config: dict[str, Any]) -> dict[str, Any]: + bundle_wheel( + {"pip/_vendor/vendor.txt": "urllib3==1.26.4\n"}, "Project-URL: Source, https://github.com/example/pip\n" + ) + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = { + "bundled-wheels": [_BUNDLED], + "supplier": {"name": "Example Org"}, + } + return config + + +def test_spdx_bundled_wheel(build_sbom: Callable[[dict[str, Any]], str], bundled_config: dict[str, Any]) -> None: + cyclonedx: Final[Document] = json.loads(build_sbom(bundled_config)) + assert to_spdx(cyclonedx)["packages"][1] == { + "SPDXID": "SPDXRef-pkg-pypi-pip-1.0", + "name": "pip", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": False, + "licenseConcluded": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "primaryPackagePurpose": "LIBRARY", + "versionInfo": "1.0", + "supplier": "Organization: Example Org", + "checksums": [{"algorithm": "SHA256", "checksumValue": cyclonedx["components"][0]["hashes"][0]["content"]}], + "comment": "example:bundled-wheel: src/example/wheels/pip-1.0-py3-none-any.whl", + "externalRefs": [ + {"referenceCategory": "PACKAGE-MANAGER", "referenceType": "purl", "referenceLocator": "pkg:pypi/pip@1.0"} + ], + } + + +def test_spdx_root_package(sbom_document: Document) -> None: + assert to_spdx(sbom_document)["packages"][0] == { + "SPDXID": "SPDXRef-pkg-pypi-example-1.0", + "name": "example", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": False, + "licenseConcluded": "NOASSERTION", + "licenseDeclared": "MIT", + "primaryPackagePurpose": "APPLICATION", + "versionInfo": "1.0", + "copyrightText": "Copyright (c) 2026 Example", + "summary": "an example", + "comment": "example:requires-python: >=3.9", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:pypi/example@1.0", + } + ], + } + + +def test_spdx_relationships(build_sbom: Callable[[dict[str, Any]], str], bundled_config: dict[str, Any]) -> None: + assert [ + relationship + for relationship in to_spdx(_load(build_sbom(bundled_config)))["relationships"] + if not relationship["spdxElementId"].startswith("SPDXRef-tool-") + ] == [ + { + "spdxElementId": "SPDXRef-DOCUMENT", + "relationshipType": "DESCRIBES", + "relatedSpdxElement": "SPDXRef-pkg-pypi-example-1.0", + }, + { + "spdxElementId": "SPDXRef-pkg-pypi-pip-1.0", + "relationshipType": "CONTAINS", + "relatedSpdxElement": "SPDXRef-pkg-pypi-pip-1.0-vendored-pkg-pypi-urllib3-1.26.4", + }, + { + "spdxElementId": "SPDXRef-pkg-pypi-example-1.0", + "relationshipType": "DEPENDS_ON", + "relatedSpdxElement": "SPDXRef-pkg-pypi-pip-1.0", + }, + { + "spdxElementId": "SPDXRef-pkg-pypi-example-1.0", + "relationshipType": "DEPENDS_ON", + "relatedSpdxElement": "SPDXRef-requires-dist-packaging-24", + }, + { + "spdxElementId": "SPDXRef-pkg-pypi-example-1.0", + "relationshipType": "DEPENDS_ON", + "relatedSpdxElement": "SPDXRef-requires-dist-tomli-2-python-version-3.11", + }, + { + "spdxElementId": "SPDXRef-pkg-pypi-pip-1.0", + "relationshipType": "DEPENDS_ON", + "relatedSpdxElement": "SPDXRef-pkg-pypi-pip-1.0-vendored-pkg-pypi-urllib3-1.26.4", + }, + ] + + +def test_spdx_build_tools(sbom_document: Document) -> None: + assert { + relationship["relatedSpdxElement"] + for relationship in to_spdx(sbom_document)["relationships"] + if relationship["relationshipType"] == "BUILD_TOOL_OF" + } == {"SPDXRef-pkg-pypi-example-1.0"} + + +@pytest.mark.parametrize( + ("metadata", "expected"), + [ + pytest.param("License-Expression: MIT\n", ("MIT", "NOASSERTION", None), id="expression"), + pytest.param( + "Classifier: License :: OSI Approved :: MIT License\nLicense: MIT\n", + ("NOASSERTION", "MIT", "Declared in package metadata as: MIT License; MIT"), + id="names", + ), + pytest.param( + "License: LGPLv3\n", + ("NOASSERTION", "NOASSERTION", "Declared in package metadata as: LGPLv3"), + id="unresolved-name", + ), + pytest.param("", ("NOASSERTION", "NOASSERTION", None), id="undeclared"), + ], +) +def test_spdx_declared_license( + build_sbom: Callable[[dict[str, Any]], str], + bundle_wheel: BundleWheel, + config: dict[str, Any], + metadata: str, + expected: tuple[str, str, str | None], +) -> None: + bundle_wheel({}, metadata) + config["tool"]["hatch"]["build"]["hooks"]["pep770"] = {"bundled-wheels": [_BUNDLED]} + package: Final[dict[str, Any]] = dict(to_spdx(_load(build_sbom(config)))["packages"][1]) + assert (package["licenseDeclared"], package["licenseConcluded"], package.get("licenseComments")) == expected + + +@pytest.mark.parametrize( + ("urls", "hooks", "expected"), + [ + pytest.param( + {"Source": "https://github.com/example/example"}, + {"pep770": {"supplier": {"name": "Example Org"}}}, + ("https://github.com/example/example/sboms/example-1.0-", ["Organization: Example Org"]), + id="repository-and-supplier", + ), + pytest.param({}, {"pep770": {}}, ("https://spdx.org/spdxdocs/sboms/example-1.0-", []), id="neither"), + pytest.param( + {}, + {"custom": {}}, + ("https://spdx.org/spdxdocs/sboms/example-1.0-", ["Tool: hatch_build.py-1.0"]), + id="custom-build-script", + ), + ], +) +def test_spdx_creation_info( + root: Path, + build_sbom: Callable[[dict[str, Any]], str], + config: dict[str, Any], + monkeypatch: pytest.MonkeyPatch, + urls: dict[str, str], + hooks: dict[str, Any], + expected: tuple[str, list[str]], +) -> None: + monkeypatch.setenv("SOURCE_DATE_EPOCH", "1700000000") + (root / "hatch_build.py").write_text( + "from hatch_pep770 import plugin\n\n\ndef get_build_hook():\n return plugin.Pep770BuildHook\n", + encoding="utf-8", + ) + config["project"]["urls"] = urls + config["tool"]["hatch"]["build"]["hooks"] = hooks + cyclonedx: Final[Document] = json.loads(build_sbom(config)) + document: Final[dict[str, Any]] = dict(to_spdx(cyclonedx)) + namespace, creators = expected + assert ( + document["documentNamespace"], + document["creationInfo"], + document["comment"], + ) == ( + f"{namespace}{cyclonedx['serialNumber'].removeprefix('urn:uuid:')}", + {"created": "2023-11-14T22:13:20Z", "creators": [*creators, f"Tool: hatch-pep770-{__version__}"]}, + ( + f"Rendered from the CycloneDX SBOM {cyclonedx['serialNumber']} (example.cdx.json), which also carries" + " per-file hashes and the build formulation." + ), + ) + + +def _load(content: str) -> Document: + return json.loads(content) diff --git a/tests/test_validate.py b/tests/test_validate.py new file mode 100644 index 0000000..d526e3b --- /dev/null +++ b/tests/test_validate.py @@ -0,0 +1,223 @@ +from __future__ import annotations + +import json +import zipfile +from typing import TYPE_CHECKING, Final + +import pytest + +from hatch_pep770.validate import document_problems, license_problems, wheel_problems + +if TYPE_CHECKING: + from pathlib import Path + + from hatch_pep770.cyclonedx import Component, Document, License + +_ALLOWED: Final[frozenset[str]] = frozenset({"Apache-2.0", "BSD-3-Clause", "MIT"}) + + +def _expression(expression: str) -> License: + return {"expression": expression, "acknowledgement": "declared"} + + +def _named(name: str) -> License: + return {"license": {"name": name, "acknowledgement": "declared"}} + + +def _concluded(identifier: str) -> License: + return {"license": {"id": identifier, "acknowledgement": "concluded"}} + + +def _denied(expression: str, bom_ref: str = "pkg:pypi/example@1.0") -> str: + return f"{bom_ref}: license {expression} is outside the allowed licenses ['Apache-2.0', 'BSD-3-Clause', 'MIT']" + + +def test_document_valid(sbom_document: Document) -> None: + assert document_problems(json.dumps(sbom_document), _ALLOWED) == [] + + +def test_document_schema_violation() -> None: + problems: Final[list[str]] = document_problems( + json.dumps({"bomFormat": "CycloneDX", "specVersion": "1.6", "version": "1"}), None + ) + assert [problem.splitlines()[0] for problem in problems] == [ + "does not conform to the CycloneDX 1.6 schema: '1' is not of type 'integer'" + ] + + +def test_document_serial_number_missing(sbom_document: Document) -> None: + unnumbered: Final[dict[str, object]] = {key: value for key, value in sbom_document.items() if key != "serialNumber"} + assert document_problems(json.dumps(unnumbered), None) == ["serialNumber must be a urn:uuid: RFC 4122 UUID, got ''"] + + +def test_document_duplicate_bom_ref(sbom_document: Document) -> None: + sbom_document["components"][1]["bom-ref"] = sbom_document["components"][0]["bom-ref"] + assert document_problems(json.dumps(sbom_document), None)[0] == ( + "bom-ref values are not unique: ['requires-dist:packaging>=24']" + ) + + +def test_document_dangling_dependency(sbom_document: Document) -> None: + sbom_document["dependencies"].append({"ref": "pkg:pypi/example@1.0", "dependsOn": ["pkg:pypi/missing"]}) + problems: Final[list[str]] = document_problems(json.dumps(sbom_document), None) + assert problems[0] == "dependencies reference bom-refs that do not exist: ['pkg:pypi/missing']" + + +def test_document_root_dependencies(sbom_document: Document) -> None: + sbom_document["dependencies"][0]["dependsOn"] = ["requires-dist:packaging>=24"] + assert document_problems(json.dumps(sbom_document), None) == [ + ( + "root dependsOn ['requires-dist:packaging>=24'] != components" + " ['requires-dist:packaging>=24', \"requires-dist:tomli>=2; python_version < '3.11'\"]" + ) + ] + + +def test_document_workflow_unknown_tool(sbom_document: Document) -> None: + sbom_document["formulation"][0]["workflows"][0]["resourceReferences"].append({"ref": "tool:missing"}) + assert document_problems(json.dumps(sbom_document), None) == [ + "workflow wheel-build references unknown tools: ['tool:missing']" + ] + + +def test_document_spdx_unparsable(sbom_document: Document) -> None: + sbom_document["metadata"]["component"]["hashes"] = [{"alg": "BLAKE2b-256", "content": "0" * 64}] + assert document_problems(json.dumps(sbom_document), None)[0].startswith("SPDX rendering does not parse:") + + +def test_document_spdx_invalid(sbom_document: Document) -> None: + sbom_document["metadata"]["component"]["purl"] = "not a purl" + assert document_problems(json.dumps(sbom_document), None)[0].startswith("SPDX rendering invalid:") + + +def test_wheel_without_sbom(tmp_path: Path) -> None: + with zipfile.ZipFile(wheel := tmp_path / "example-1.0-py3-none-any.whl", "w") as archive: + archive.writestr("example-1.0.dist-info/METADATA", "Name: example\n") + assert wheel_problems(wheel, None) == ["no .dist-info/sboms/*.cdx.json found in the wheel"] + + +def test_wheel_names_each_sbom(sbom_document: Document, tmp_path: Path) -> None: + unnumbered: Final[dict[str, object]] = {key: value for key, value in sbom_document.items() if key != "serialNumber"} + with zipfile.ZipFile(wheel := tmp_path / "example-1.0-py3-none-any.whl", "w") as archive: + archive.writestr("example-1.0.dist-info/sboms/example.cdx.json", json.dumps(unnumbered)) + assert wheel_problems(wheel, None) == [ + "example-1.0.dist-info/sboms/example.cdx.json: serialNumber must be a urn:uuid: RFC 4122 UUID, got ''" + ] + + +@pytest.mark.parametrize( + ("licenses", "expected"), + [ + pytest.param([_expression("MIT")], [], id="allowed"), + pytest.param([_expression("mit")], [], id="allowed-any-case"), + pytest.param([_expression("GPL-3.0-only")], [_denied("GPL-3.0-only")], id="denied"), + pytest.param([_expression("Apache-2.0 OR GPL-3.0-only")], [], id="or-one-allowed"), + pytest.param( + [_expression("GPL-3.0-only OR MPL-2.0")], [_denied("GPL-3.0-only OR MPL-2.0")], id="or-none-allowed" + ), + pytest.param([_expression("MIT AND BSD-3-Clause")], [], id="and-all-allowed"), + pytest.param([_expression("MIT AND GPL-3.0-only")], [_denied("MIT AND GPL-3.0-only")], id="and-one-denied"), + pytest.param([_expression("MIT OR GPL-3.0-only AND LGPL-3.0-only")], [], id="and-binds-tighter"), + pytest.param( + [_expression("(MIT OR GPL-3.0-only) AND LGPL-3.0-only")], + [_denied("(MIT OR GPL-3.0-only) AND LGPL-3.0-only")], + id="parentheses", + ), + pytest.param([_expression("Apache-2.0 WITH LLVM-exception")], [], id="with-allowed"), + pytest.param( + [_expression("GPL-2.0-only WITH Classpath-exception-2.0")], + [_denied("GPL-2.0-only WITH Classpath-exception-2.0")], + id="with-denied", + ), + pytest.param([_named("MIT License"), _concluded("MIT")], [], id="concluded-allowed"), + pytest.param([_named("MPL 2.0"), _concluded("MPL-2.0")], [_denied("MPL-2.0")], id="concluded-denied"), + pytest.param( + [_concluded("MIT"), _concluded("LGPL-3.0-only")], [_denied("LGPL-3.0-only")], id="concluded-all-apply" + ), + pytest.param( + [_named("MIT License")], + ["pkg:pypi/example@1.0: declares license names ['MIT License'] with no SPDX id"], + id="name-only", + ), + pytest.param([], ["pkg:pypi/example@1.0: declares no license"], id="undeclared"), + ], +) +def test_license_policy(licenses: list[License], expected: list[str]) -> None: + component: Final[Component] = { + "type": "library", + "bom-ref": "pkg:pypi/example@1.0", + "name": "example", + "hashes": [{"alg": "SHA-256", "content": "0" * 64}], + "licenses": licenses, + } + assert license_problems([component], _ALLOWED) == expected + + +@pytest.mark.parametrize( + ("expression", "reason"), + [ + pytest.param("MIT AND", "it ends early", id="trailing-operator"), + pytest.param("OR MIT", "unexpected 'OR'", id="leading-operator"), + pytest.param("(MIT", "it ends early", id="unclosed"), + pytest.param("MIT)", "unexpected ')'", id="unopened"), + pytest.param("(MIT Apache-2.0)", "expected ')', got 'Apache-2.0'", id="missing-operator"), + pytest.param("MIT and Apache-2.0", "unexpected 'and'", id="lower-case-operator"), + pytest.param("Apache-2.0 WITH OR", "unexpected 'OR'", id="with-operator"), + ], +) +def test_license_policy_malformed(expression: str, reason: str) -> None: + component: Final[Component] = { + "type": "library", + "bom-ref": "pkg:pypi/example@1.0", + "name": "example", + "hashes": [{"alg": "SHA-256", "content": "0" * 64}], + "licenses": [_expression(expression)], + } + assert license_problems([component], _ALLOWED) == [ + f"pkg:pypi/example@1.0: license expression {expression!r} is malformed: {reason}" + ] + + +@pytest.mark.parametrize( + "component", + [ + pytest.param( + {"type": "library", "bom-ref": "requires-dist:distlib", "name": "distlib"}, id="declared-requirement" + ), + pytest.param( + { + "type": "library", + "bom-ref": "pkg:pypi/pip@1.0", + "name": "pip", + "hashes": [{"alg": "SHA-256", "content": "0" * 64}], + "licenses": [_expression("MIT")], + "components": [ + {"type": "library", "bom-ref": "pkg:pypi/pip@1.0#vendored/pkg:pypi/autocommand@2.2.2", "name": "a"}, + ], + }, + id="vendored-by-bundled-wheel", + ), + pytest.param( + { + "type": "file", + "bom-ref": "loader", + "name": "loader", + "hashes": [{"alg": "SHA-256", "content": "0" * 64}], + }, + id="file", + ), + ], +) +def test_license_policy_skips_unshipped(component: Component) -> None: + assert license_problems([component], _ALLOWED) == [] + + +def test_license_policy_judges_files_owner() -> None: + component: Final[Component] = { + "type": "library", + "bom-ref": "pkg:pypi/distlib@0.4", + "name": "distlib", + "licenses": [_concluded("LGPL-3.0-only")], + "components": [{"type": "file", "bom-ref": "pkg:pypi/distlib@0.4#distlib/__init__.py", "name": "x"}], + } + assert license_problems([component], _ALLOWED) == [_denied("LGPL-3.0-only", "pkg:pypi/distlib@0.4")] diff --git a/tox.toml b/tox.toml new file mode 100644 index 0000000..bcb5f79 --- /dev/null +++ b/tox.toml @@ -0,0 +1,72 @@ +requires = [ "tox>=4.64.7", "tox-uv>=1.36.1" ] +env_list = [ "3.15", "3.14", "3.13", "3.12", "3.11", "3.10", "3.9", "3.15t", "fix", "pkg_meta", "type" ] +skip_missing_interpreters = true + +[env_run_base] +description = "run the tests with pytest under {env_name}" +default_base_python = [ "3.15" ] +package = "wheel" +wheel_build_env = ".pkg" +dependency_groups = [ "test" ] +pass_env = [ "PYTEST_*" ] +set_env.COVERAGE_FILE = { replace = "env", name = "COVERAGE_FILE", default = "{work_dir}{/}.coverage.{env_name}" } +commands = [ + [ + "pytest", + { replace = "posargs", default = [ + "--durations", + "5", + "--junitxml", + "{work_dir}{/}junit.{env_name}.xml", + "--no-cov-on-fail", + "--cov", + "{env_site_packages_dir}{/}hatch_pep770", + "--cov", + "{tox_root}{/}tests", + "--cov-config", + "{tox_root}{/}pyproject.toml", + "--cov-context", + "test", + "--cov-report", + "term-missing:skip-covered", + "--cov-report", + "html:{env_tmp_dir}{/}htmlcov", + "--cov-report", + "xml:{work_dir}{/}coverage.{env_name}.xml", + "--cov-fail-under=100", + "tests", + ], extend = true }, + ], +] + +[env_pkg_base] +default_base_python = [ "3.15" ] + +[env.fix] +description = "format the code base to adhere to our styles, and complain about what we cannot do automatically" +skip_install = true +deps = [ "pre-commit-uv>=4.3" ] +pass_env = [ { replace = "ref", of = [ "env_run_base", "pass_env" ], extend = true }, "PROGRAMDATA" ] +commands = [ [ "pre-commit", "run", "--all-files", "--show-diff-on-failure", { replace = "posargs", extend = true } ] ] + +[env.pkg_meta] +description = "check that the long description is valid" +skip_install = true +dependency_groups = [ "pkg-meta" ] +commands = [ + [ "uv", "build", "--sdist", "--wheel", "--out-dir", "{env_tmp_dir}", "." ], + [ "twine", "check", "{env_tmp_dir}{/}*" ], + [ "check-wheel-contents", "--no-config", "{env_tmp_dir}" ], +] + +[env.type] +description = "run type check on code base" +dependency_groups = [ "type" ] +commands = [ [ "ty", "check", "--output-format", "concise", "--error-on-warning", "." ] ] + +[env.dev] +description = "dev environment with all deps at {envdir}" +package = "editable" +deps = [ { replace = "ref", of = [ "requires" ], extend = true } ] +dependency_groups = [ "release", "type" ] +commands = [ [ "uv", "pip", "tree" ], [ "python", "-c", 'print(r"{env_python}")' ] ]