Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__version__ missing #68

Open
buhtz opened this issue Mar 25, 2024 · 2 comments
Open

__version__ missing #68

buhtz opened this issue Mar 25, 2024 · 2 comments

Comments

@buhtz
Copy link
Contributor

buhtz commented Mar 25, 2024

Not sure but it seems that there is no version information available.

>>> import orgparse
>>> orgparse.__version__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'orgparse' has no attribute '__version__'

I do use 0.4.20231004 from PyPi install via pip.

@karlicoss
Copy link
Owner

Sorry, just noticed it! I think I removed it when I switched to semantic versioning generated from git tag information -- maintinaing a version manually in the source code is kind of annoying.
You can get installed version with importlib.metadata.version("orgparse") (and that works with any package!) https://docs.python.org/3/library/importlib.metadata.html#overview -- does that work for you?

@buhtz
Copy link
Contributor Author

buhtz commented Oct 5, 2024

Thank you for your reply.
Having __version__ doesn't mean to fill this variable with a static value. See this example of one of my own projects how you can generate such data based on the packages meta data.

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

No branches or pull requests

2 participants