-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
feature: write __version__.py automatically #2
Comments
Hey there! I think this would definitely make sense to add to the plugin, although it's a little more complicated than just that change. If you'd like to send a PR, that would be great, or I can take a look as soon as I have a chance. Some thoughts:
I'm not sure the best way to handle the second point. We could use some info from pyproject.toml and maybe some info exposed by Poetry to make a reasonable guess on a default location, but we'd probably need a fallback option to specify the file explicitly. |
I'm researching this issue right now. First of all, note the discussion here python-poetry/poetry#144 (comment) Apparently the idea of adding this to poetry existed at some point. Also, it seems that with 3.8 (3.7 backported) it is possible to access the version from code: python-poetry/poetry#144 (comment) For me personally, this would solve the problem of accessing the version at runtime and make it unnecessary to dynamically write a |
This is now available in 0.4.0! Instead of creating a
|
Dear Matthew,
thanks a lot for poetry-dynamic-versioning. It is great!
Additionally it would be interesting if poetry could write the file
automatically and fill it with the dynamic version number string.
This feature could be implemented with just three lines at the end of
_get_version()
:Would you consider a pull request?
Best regards
Lars
The text was updated successfully, but these errors were encountered: