Skip to content
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

chore(packaging): Fix computing SCM-based version @ the dists #735

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

webknjaz
Copy link
Contributor

The previously existing attempt to use setuptools-git-version never worked as it wasn't integrated correctly — it was added as a runtime dependency while it's meant to be a build dependency. This resulted in 0.0.0 being used all the time.

This patch adds a hatchling plugin that implements the original idea in a way that actually works.

Put an x into the box if that apply:

  • This PR introduces breaking change.
  • This PR fixes a bug.
  • This PR adds new functionality.
  • This PR enhances existing functionality.

Description of your changes

$sbj.

How can we test changes

python -Im build

The previously existing attempt to use `setuptools-git-version` never
worked as it wasn't integrated correctly — it was added as a runtime
dependency while it's meant to be a build dependency. This resulted in
0.0.0 being used all the time.

This patch adds a hatchling plugin that implements the original idea in
a way that actually works.
@MaxymVlasov MaxymVlasov changed the title chore(packaging): X📦 Fix computing SCM-based version @ the dists chore(packaging): Fix computing SCM-based version @ the dists Dec 28, 2024
@MaxymVlasov MaxymVlasov merged commit ae5057d into antonbabenko:master Dec 28, 2024
6 checks passed
webknjaz added a commit to webknjaz/antonbabenko--pre-commit-terraform that referenced this pull request Dec 28, 2024
It's a follow-up to antonbabenko#735 that lacks this property. It's also an internal
change.

It essentially allows one to
```
$ pip install https://github.com/antonbabenko/pre-commit-terraform/archive/ae5057d.zip
```
and get a correctly computed version in the installed metadata.

[1]: https://setuptools-scm.rtfd.io/en/latest/usage/#git-archives
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants