Haha, `setuptools_scm` apparently does not, itself, expose a `__version__` attribute.
You could use importlib.metadata (stdlib 3.8+) and importlib_metadata (backport):
>>> import importlib.metadata
>>> importlib.metadata.version("setuptools_scm")
'8.0.4'
I'm still happily using setuptools_scm, albeit now wrapped in hatch-vcs.
I think the headaches are more likely coming from something with a two in it...
@hugovk That's a lot of complexity to find out what version of `setuptools_scm` I've got, particularly when I don't really want to be on the aggressive bitrot train.
The headaches started when I first installed it and they aren't so bad, but honestly it's just kinda not worth it? I don't think the problem it solves is that time-consuming, so it doesn't take much of a headache to not be worth it.
@pganssle Yeah, I guess for less regular releases, hardcoding and editing a version is not so bad. Probably not worth the hassle when you've got other legacy things to juggle.
I use it so I can automate deploys by creating a GitHub release/tag, which means I can do it via the GitHub UI, and even from my phone.
I think at this point `setuptools_scm` (and other tools like it) have probably caused more headaches for me than they've solved.