[CI] Make nightly wheel version PEP 440 / PyPI compliant#1000
Open
hunhoffe wants to merge 3 commits into
Open
Conversation
The nightly wheel version was `X.Y.Z.{datetime}+{hash}`. The `+hash`
local version segment is rejected by PyPI on upload, which prevents
publishing under the project's own name and leaves the `llvm-aie` PyPI
namespace unclaimed (a supply-chain risk for downstream consumers like
mlir-aie that resolve `pip install llvm-aie`).
Switch the nightly to `X.Y.Z.{datetime}` (PEP 440 4-segment release):
- PyPI-uploadable.
- `pip install llvm-aie` resolves to the latest nightly with no
`--pre` required, matching this project's posture (nightlies are
the only artifact shipped, not pre-releases of a future stable).
- Pinnable: `llvm-aie==X.Y.Z.{datetime}` resolves a specific build.
Embed the source commit inside the wheel as `commit.txt` so the SHA is
recoverable from the unpacked tree (PEP 440 no longer lets it ride in
the version string).
Bump DATETIME granularity from hour to minute. With `+hash` removed,
two uploaded runs in the same hour (release: published colliding with
the nightly cron, manual workflow_dispatch re-runs, etc.) would produce
identical wheel filenames and silently overwrite on GitHub Releases /
fail on PyPI. Minute granularity makes practical collisions impossible
since the build itself takes longer than a minute.
Adjust the get_wheel_version step accordingly: it previously assumed a
`+` was present in the version string and would crash without it.
Note: a future stable release would need to bump the major (e.g.
`20.0.0`) since `19.0.0.{datetime}` sorts above `19.0.0` under PEP 440.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
konstantinschwarz
approved these changes
May 13, 2026
Collaborator
konstantinschwarz
left a comment
There was a problem hiding this comment.
This change looks good to me! I assume we'll need to synchronize with the consumers of our packages to use the new names for version pinning
Author
|
Hi! Would a maintainer be willing to kick off the AMD AIE Distro workflow against this branch? It's workflow_dispatch-only and doesn't run on PRs, so the version-string changes haven't actually been exercised in CI yet. A single Linux x86_64 matrix entry is enough to verify — I'd like to confirm the wheel filename, embedded commit.txt, and the patched get_wheel_version step all behave as intended before this merges. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Today's nightly wheel version is
X.Y.Z.{datetime}+{hash}. The+hashlocal version segment is rejected by PyPI on upload, so the wheels can only ship to GitHub Releases and thellvm-aiePyPI namespace stays unclaimed.Change
Three small edits, scoped to
.github/workflows/:Version →
X.Y.Z.{datetime}(4-segment PEP 440 release). PyPI-uploadable. Barepip install llvm-aieworks without--pre, matching the project's posture (nightlies are the shipped artifact). Pinnable asllvm-aie==X.Y.Z.{datetime}for reproducible builds downstream.Embed the source SHA inside the wheel as
commit.txt. PEP 440 no longer lets the hash ride in the version string, so this keeps it recoverable from the unpacked tree.long_descriptionstill links the GitHub commit URL.DATETIMEgranularity hour → minute. With+hashremoved, two uploaded runs in the same hour would produce identical wheel filenames and silently overwrite on GitHub Releases. Minute granularity makes practical collisions impossible.The
get_wheel_versionstep is also adjusted — it previously assumed a+was present in the version and would crash without one.Notes for reviewers
llvm_aie-19.0.0.202605131342-py3-none-manylinux_2_28_x86_64.whl20.0.0), since19.0.0.{datetime}sorts above19.0.0under PEP 440. Happy to switch to a.devNscheme instead if the project would prefer that ordering property — the trade-off is--prebecomes required for barepip install.Thanks for considering — let me know what you'd like adjusted!