Skip to content

merge queue: embarking main (d31d0b7) and #1355 together#1360

Closed
mergify[bot] wants to merge 3 commits intomainfrom
mergify/merge-queue/ad903dc797
Closed

merge queue: embarking main (d31d0b7) and #1355 together#1360
mergify[bot] wants to merge 3 commits intomainfrom
mergify/merge-queue/ad903dc797

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 5, 2026

🎉 This pull request has been checked successfully and will be merged soon. 🎉

Branch main (d31d0b7) and #1355 are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of #1355.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue rule default for merge:

Required conditions to stay in the queue:

---
checking_base_sha: d31d0b7236bdb118abbade425993eaaeccd27263
previous_failed_batches: []
pull_requests:
  - number: 1355
    scopes: []
scopes: []
...

jd and others added 3 commits May 5, 2026 12:12
The 2026.5.5.1 release upload to PyPI failed with
``400 License-File LICENSE does not exist in distribution file
mergify_cli-2026.5.5.1.tar.gz at mergify_cli-2026.5.5.1/LICENSE``.

Maturin auto-derives a ``License-File: LICENSE`` PEP 639 metadata
field from ``license = "Apache-2.0"`` plus the project root
``LICENSE`` file, but the sdist tarball (``maturin sdist``) packs
the cargo workspace and the Python source dir without picking up
the project root ``LICENSE`` itself. PyPI's upload validator
cross-checks the metadata against the tarball contents and 400s
when they disagree.

Listing ``LICENSE`` in ``[tool.maturin].include`` puts it back in
both the wheel and the sdist, so the metadata claim is honored and
PyPI accepts the upload.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Change-Id: Ie45717750af52467929600966592cb8453d3b4d2
Without this, packaging-metadata bugs only surface at
``release: published`` time — release 2026.5.5.1 was rejected by
PyPI's upload validator with ``400 License-File LICENSE does not
exist in distribution file`` because the LICENSE auto-bundling
hadn't been wired up. PR CI couldn't have caught it: ``build-sdist``
was gated on ``inputs.stamp-version``, so PR runs skipped the sdist
entirely, and there was no twine invocation anywhere.

Two changes:

1. ``build-sdist`` now runs on every PR. The version-stamping step
   and the artifact upload still gate on ``inputs.stamp-version``
   (PR builds keep the placeholder version and skip the upload —
   the artifact is only useful for the publish job in
   ``release.yml``). The Python toolchain is provisioned the same
   way as the wheel jobs.

2. ``twine check --strict`` runs against both the wheel (per
   matrix target) and the sdist immediately after each is built.
   Strict mode applies the same metadata rules PyPI's upload
   validator does — README rendering,
   ``Description-Content-Type``, ``License-File`` presence — so a
   mismatch fails PR CI instead of the next release.

The cost is one extra ubuntu-24.04 job (~30s for sdist + twine
check) and a few seconds per wheel-matrix shard for the twine
install + check.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Change-Id: I0f7338df02bbf600804a58bcb996bcb882de6010
@mergify mergify Bot deployed to Mergify Merge Protections May 5, 2026 12:19 Active
@mergify mergify Bot closed this May 5, 2026
@mergify mergify Bot deleted the mergify/merge-queue/ad903dc797 branch May 5, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant