8000 Use PEP440 compatible version for canary builds by kenodegard · Pull Request #14860 · conda/conda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use PEP440 compatible version for canary builds #14860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 21, 2025
Merged

Conversation

kenodegard
Copy link
Contributor
@kenodegard kenodegard commented May 20, 2025

Description

Closes #14859, #14843, #14858

Do not use yanked version of setuptools-scm due to issues with version handling.

See #14858 (comment)

After much investigations and tinkering we have determined the issue is not with setuptools-scm 8.2.1 but rather with the version generated in our recipe.

The setuptools-scm 8.2.1 package added an activation script setting export SETUPTOOLS_SCM_PRETEND_VERSION=${PKG_VERSION} resulting in hatchling automatically detecting the recipe version.

Since {{ GIT_BUILD_STR }} == {{ GIT_DESCRIBE_NUMBER }}_{{ GIT_DESCRIBE_HASH }} we were creating an invalid version which hatchling rejected.

The solution is to use {{ GIT_DESCRIBE_NUMBER }}+{{ GIT_DESCRIBE_HASH }} instead of {{ GIT_BUILD_STR }}.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

kenodegard and others added 2 commits May 20, 2025 12:43
Co-Authored-By: Jonathan J. Helmus <jjhelmus@gmail.com>
Co-Authored-By: Jonathan J. Helmus <jjhelmus@gmail.com>
@kenodegard kenodegard added the build::review trigger a build for this PR label May 20, 2025
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label May 20, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review May 20, 2025
@conda-bot conda-bot removed the build::review trigger a build for this PR label May 20, 2025
@conda-bot
Copy link
Contributor
conda-bot commented May 20, 2025

Review build status

The workflow for building and uploading a canary release for conda with the label conda-conda-pr-14860 in channel conda-canary was started by @kenodegard!

Once it's done, use this command to try it out in a new conda environment:

conda install -c conda-canary/label/conda-conda-pr-14860 conda

Copy link
codspeed-hq bot commented May 20, 2025

CodSpeed Performance Report

Merging #14860 will not alter performance

Comparing setuptools-scm (906eab8) with main (6ad8ba8)

Summary

✅ 21 untouched benchmarks

@kenodegard kenodegard changed the title Do not use setuptools-scm=8.2.1 Use PEP440 compatible version for canary builds May 20, 2025
jjhelmus
jjhelmus previously approved these changes May 20, 2025
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Approved in 🔎 Review May 20, 2025
@kenodegard kenodegard added the build::review trigger a build for this PR label May 20, 2025
@conda-bot conda-bot removed the build::review trigger a build for this PR label May 20, 2025
@kenodegard kenodegard marked this pull request as ready for review May 20, 2025 19:26
@kenodegard kenodegard requested a review from a team as a code owner May 20, 2025 19:26
@kenodegard kenodegard enabled auto-merge (squash) May 20, 2025 19:26
@jjhelmus
Copy link
Contributor

https://packaging.python.org/en/latest/specifications/version-specifiers/#dvcs-based-version-labels has suggestions on how to produce compatible version from version control systems.

Of note is:

Identifying hash information may also be included in local version labels.

This is in line with the approach here, +{{ GIT_DESCRIBE_HASH }} set the local version identifier to the hash from git describe.

@kenodegard
Copy link
Contributor Author
kenodegard commented May 20, 2025

Blocked by windows test failure, can be fixed by either of the following:

@kenodegard kenodegard moved this from ✅ Approved to 👀 In Review in 🔎 Review May 20, 2025
@kenodegard kenodegard moved this from 👀 In Review to 🛑 Blocked in 🔎 Review May 21, 2025
This was linked to issues May 21, 2025
@github-project-automation github-project-automation bot moved this from 🛑 Blocked to ✅ Approved in 🔎 Review May 21, 2025
@kenodegard kenodegard merged commit dd650ce into main May 21, 2025
75 checks passed
@kenodegard kenodegard deleted the setuptools-scm branch May 21, 2025 06:27
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🏁 Done in 🔎 Review May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

Tests failed (2025-05-20) Tests failed (2025-05-19) Tests failed (2025-05-14)
4 participants
0