Replace afew/version.py with importlib.metadata.version - #381
Conversation
|
Mmmh, https://setuptools-scm.readthedocs.io/en/latest/usage/ says in their So I'm a bit baffled this changed when switching from using a |
|
I'm no Python packaging expert, but I understand that generating of |
|
The correct fix is to migrate the version action to use |
This fixes errors like this:
Traceback (most recent call last):
File "/nix/store/mkdw047dmy7ipd1g1pqyrjhp29ldasna-afew-4.0.1/bin/.afew-wrapped", line 6, in <module>
from afew.commands import main
File "/nix/store/mkdw047dmy7ipd1g1pqyrjhp29ldasna-afew-4.0.1/lib/python3.14/site-packages/afew/commands.py", line 16, in <module>
from afew.version import version
ModuleNotFoundError: No module named 'afew.version'
|
Updated the PR based on @mweinelt's suggestion. |
|
Thanks. I also now understand why things initially looked fine locally, I still had a generated I'll remove it from |
Previously,
afew/version.pywas generated by setuptools. Without this file, one gets errors like this: