pantab icon indicating copy to clipboard operation
pantab copied to clipboard

Set __version__ from importlib.metadata

Open WillAyd opened this issue 1 year ago • 2 comments

I think it would help simplify things if we set the internal version attribute to match what importlib.metadata for the package lists. That way, we don't need to keep repeating the version in a few places, and can leave it to the backend to properly manage.

For more information, see https://packaging.python.org/en/latest/discussions/single-source-version/#single-source-version

WillAyd avatar Oct 23 '24 02:10 WillAyd

In the past, I've had good success with versioneer to fetch version info from the git tag and reference that throughout the project. Does that seem like a workable solution for you?

jorwoods avatar Oct 23 '24 03:10 jorwoods

I would like to avoid versioneer and any associated tools. They work well and were designed for use with setuptools, but don't fit the paradigms that build backends like CMake or meson-Python use

WillAyd avatar Oct 23 '24 11:10 WillAyd

Isn't the whole point of importlib.metadata that packages no longer need to expose a __version__ themselves at all?

septatrix avatar Jan 04 '26 23:01 septatrix