ofek / hatch-vcs

Hatch plugin for versioning with your preferred VCS
MIT License
111 stars 15 forks source link

Move version file generation to new package? #7

Closed agoose77 closed 2 years ago

agoose77 commented 2 years ago

Hi @ofek,

I was going through the process of adding template-file generation to https://github.com/agoose77/hatch-nodejs-version when it occurred to me that I'd be cloning the build plugin of hatch-vcs. I wonder whether it would be nice to move the build plugin to a new package, e.g. hatch-version-template given that any version plugin can be used in combination with it.

ofek commented 2 years ago

Hey! I'm sorry, what does this mean?

agoose77 commented 2 years ago

hatch-vcs does two things right now:

This build plugin doesn't do anything VCS specific (although it does use setuptools_scm under the hood). How would you feel about splitting the build plugin out of hatch-vcs and into a new PyPI package e.g hatch-version-template? That way, something like hatch-nodejs-version could use it to write the NodeJS package.json version to _version.py at build time.

ofek commented 2 years ago

Ohhhhh, I see. That's a good idea!

RonnyPfannschmidt commented 2 years ago

How about having it part of the core hatch package, even for intentionally pyproject.toml static versions it potentially nice to have for source of true management

Also it may be nice to enable parsing free fast construction of version objects

ofek commented 2 years ago

Ok, I will then

ofek commented 2 years ago

https://github.com/pypa/hatch/pull/286