-
Notifications
You must be signed in to change notification settings - Fork 1
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
(fix): add __version__
#40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't settled on a release process, but I think when you do releases with git tags, there is a _version.py
that is updated automatically. Phil definitely knows more than I do about this.
I believe this is done via hatch-vcs
Ok, we'll need to tie that in with Maturin in some way. I think the single source of truth is currently the |
https://docs.python.org/3/library/importlib.metadata.html#importlib.metadata.version It's possible this somehow works magically, but I honestly don't know (and probably have no way of knowing from that docstring) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I should have just tried this. It does work, and must be coming from the build process but don't really understand how.
To explain everything else: To build a Python package, one needs a build backend. So we currently can’t do that. But: Maturin derives the Python package’s version number from |
Since it all depends on the |
That’s 300μs faster at import time which is nothing. But since it’s also not complicated either is fine. |
No description provided.