Resolve build problems in 3.3.1.0#1026
Merged
jujubot merged 4 commits intojuju:masterfrom Feb 15, 2024
Merged
Conversation
This fixes the 1st issue described in juju#1025 (comment)
file This fixes juju#1025 by removing the dependency to the external static VERSION file from within the project, allowing it to work in environments where pylibjuju is installed as a dependency library. Note that this changes the release process. In particular where we need to manually change the version information is moved into version.py (the release process document will be updated) This also removes the VERSION file.
jack-w-shaw
approved these changes
Feb 15, 2024
| # documentation root, use os.path.abspath to make it absolute, like shown here. | ||
| sys.path.insert(0, os.path.abspath('..')) | ||
|
|
||
| from juju.version import CLIENT_VERSION |
Member
There was a problem hiding this comment.
Imports should be at the top no?
Contributor
Author
There was a problem hiding this comment.
This one should stay there because it won't work before the sys.path.insert(0, os.path.abspath('..')) line above
| setup( | ||
| name='juju', | ||
| version=version.read_text().strip(), | ||
| version=CLIENT_VERSION.strip(), |
Contributor
Author
There was a problem hiding this comment.
We currently don't need to, but the line that's coming from will be manually edited by people who're making releases (replaces the file VERSION) in the future, so I thought this would cleanup any silly mistakes like "4.2.0 " (whitespace in the end).
Contributor
Author
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This solves 2 problems with the latest release (also described in this comment):
packagingmodule, but didn't include it in thesetup.py(because our testing and dev environments have tox installed and tox satisfies that requirement for itself, so we didn't notice).This change fixes #1025, solving these issues by:
packagingto the required modules.VERSION, and moving the static version information into theversion.pymodule (just like in Juju) and use that information from there. The places that dynamically use that information (outside of the juju modules) are i)setup.pyto get the version info into the build, ii)Makefileto use it in the release target iii)docs/config.pyfor building the docs. All of these spots are updated to use the info within theversion.py.QA Steps
We'll use the steps described in #1025. After pulling the branch in this PR;
dist/juju-3.3.1.0.tar.gz, so install that:Controller.Without the (1)st change in this PR, this command would result in:
And without the (2)nd change, this command would error with
But with this change, we shouldn't see either (or any other) error. I.e., the command should succeed with no problems.
Notes & Discussion
Note that this changes the release process. In particular where we need to manually change the version information is moved into the
version.pymodule (the release process document will be updated right before this PR is merged).Moreover, we need to make a patch release (
3.3.1.1) after this for these changes to take effect (i.e. for pylibjuju to be usable in the environments where it's installed as a dependency).JUJU-5484