-
Notifications
You must be signed in to change notification settings - Fork 0
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
check / install python version using pyenv #1
base: master
Are you sure you want to change the base?
Conversation
Sorry asking you to check code style. I can add some tests. |
a lot more code than I was expecting ;-) |
timeout_tools/cli.py
Outdated
if status: | ||
raise BaseException(f'Failed to install python version {python_version}') | ||
else: | ||
print(f'- Python `{python_version}` installation successful ✅') |
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.
the first part of the message should print before the installs start and the tick be added when in succeeds
@@ -158,9 +162,13 @@ def python_setup_func(args): | |||
|
|||
|
|||
def python_setup(app, branch, python_version): | |||
try: | |||
check_python_version_installed(python_version) |
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.
I feel the logic shouldn't be inside the check function, ie if the check returns false here then call the install here
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.
certainly makes the tests easier
Checks the correct version of Python is installed and managed by Pyenv
If version is not installed attempts to install using pyenv
If version is not available prompts user to update pyenv