-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Move version single source outside of __init__.py
#10497
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
Conversation
2ab5661
to
d28e66c
Compare
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.
thanks for taking a stab at this @silv-io! could you clarify for posterity why we need a VERSION
file in this iteration? wouldn't introducing the version
module and localstack.version.__version__
be enough?
@thrau, there are multiple benefits to that. As you can see in the changes, many of the scripts just get way easier to handle when having the version source separated into a simple text file. This is also mentioned as a benefit in the PyPA guide in (4.):
So no need to use Another point is that in a multi distribution setup it is also much easier to send a plain version file to subpackages that they can reference in the |
d28e66c
to
f39c3bb
Compare
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.
Overall looks really good! The arguments make sense to me and I can see that the version file is a good way forward!
Just one comment related to updating the version number. I think I may be missing something though since I saw that the content is overwritten somewhere in the release helper.
ea1a7b3
to
db97b53
Compare
Motivation
To introduce namespace packages, the modern way is to remove all
__init__.py
files in the namespace package, our caselocalstack_ext
. Currently this is not possible because our init file contains the version attribute used in various scripts.Changes
__version__
out of the__init__.py
into aVERSION
file residing in the top-level of the project.pyproject.toml
take the version out of theVERSION
fileVERSION
filesetup.py
which - on install/build - takes the value from theVERSION
file and produces aversion.py
file inlocalstack
.VERSION
inconstants.py
and take the value fromVERSION
out oflocalstack.version.__version__
(version.py
might not yet exist in older images which can lead to issues in the CI right now)Testing
TODO
What's left to do:
Note
This PR was recreated with a new branch name to trigger the companion branch detection