Skip to content

Recover package versions from source archives - #91

Merged
Marenz merged 1 commit into
frequenz-floss:v0.x.xfrom
Marenz:fix/sdist-version-fallback
Aug 4, 2026
Merged

Recover package versions from source archives#91
Marenz merged 1 commit into
frequenz-floss:v0.x.xfrom
Marenz:fix/sdist-version-fallback

Conversation

@Marenz

@Marenz Marenz commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

python -m build creates the sdist successfully, but rebuilding the wheel from that archive fails because setuptools-scm no longer has Git metadata.

Configure the generated sdist directory prefix as the version fallback. This fixes ordinary branch builds and tagged releases.

Verified with:

  • uv run --extra dev-noxfile nox
  • uv build
  • uv run --with twine twine check dist/*

Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
@Marenz Marenz added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Aug 4, 2026
@Marenz
Marenz requested a lite review from Copilot August 4, 2026 10:49
@github-actions github-actions Bot added the part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) label Aug 4, 2026
@Marenz
Marenz marked this pull request as ready for review August 4, 2026 10:50
@Marenz
Marenz requested a review from a team as a code owner August 4, 2026 10:50
@Marenz
Marenz requested review from florian-wagner-frequenz and removed request for a team August 4, 2026 10:50
@Marenz
Marenz merged commit a20fd7f into frequenz-floss:v0.x.x Aug 4, 2026
13 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the setuptools-scm configuration so package versions can be recovered when building a wheel from an sdist (where Git metadata is unavailable), aligning with the stated goal of making python -m build/rebuild workflows succeed for branch builds and tagged releases.

Changes:

  • Configure setuptools-scm to infer versions from the sdist’s parent directory name via parentdir_prefix_version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
ignore_missing_imports = true

[tool.setuptools_scm]
parentdir_prefix_version = "frequenz_client_marketmetering-"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants