-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
dynamic version #1314
Comments
I'm looking for the exact same thing. The reason for this is, that I need the version number within my package as well. I could imagine somthing like this: [tool.poetry]
name = "my_package"
version = {path = "/path/to/package.json"} Where {
"version": "0.1.0"
} |
Another way I could think of, is that there is in option for |
I have been using (and loving) the trick from this comment: #144 (comment) In order to adapt it to your own project, all you need to do is change Then you can run that make command (or shell script, if you use that approach) to have The only restriction is that the same version string shouldn't show up in an unrelated way in the file (e.g., don't run it on a file that includes version numbers for all of your dependencies). |
Thanks for pointing me to that issue! Having a custom script, that do the version bumping in all files, is one workaround, but would introduce a new "tool" beside poetry. But I like other solutions mentioned there and in linked issues: With the last one, one can get all metadata shipped with the package and is intended to get integrated in python3.8 (before one has to install it via pip). To think in a bigger context: The underlying question in all 3 issues is how and where to store metadata that is needed by poetry during build process and also by the package itself, in a way that only one location is needed. The most cleanest way seems to me having the metadata in the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Question
I'm migrating a project to poetry
I would like to make the
version
based on the contents of a file, say JSON or__init__.py
any advice you can offer?The text was updated successfully, but these errors were encountered: