Skip to content

Comments

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

Merged
MaxymVlasov merged 1 commit intoantonbabenko:masterfrom
webknjaz:bugfix/hatching-vcs
Dec 28, 2024
Merged

chore(packaging): Fix computing SCM-based version @ the dists#735
MaxymVlasov merged 1 commit intoantonbabenko:masterfrom
webknjaz:bugfix/hatching-vcs

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
5 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
webknjaz added a commit to webknjaz/antonbabenko--pre-commit-terraform that referenced this pull request Jan 14, 2025
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
webknjaz added a commit to webknjaz/antonbabenko--pre-commit-terraform that referenced this pull request Jan 14, 2025
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
webknjaz added a commit to webknjaz/antonbabenko--pre-commit-terraform that referenced this pull request Jan 15, 2025
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
webknjaz added a commit to webknjaz/antonbabenko--pre-commit-terraform that referenced this pull request Jan 15, 2025
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
@antonbabenko
Copy link
Owner

This PR is included in version 1.97.0 🎉

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.

3 participants