-
-
Notifications
You must be signed in to change notification settings - Fork 6
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 python version compatibility in install script #177
Conversation
syftbox/server/templates/install.sh
Outdated
|
||
# Check if Python version is greater than or equal to 3.10 | ||
if [ "$major_version" -eq 3 ] && [ "$minor_version" -ge 10 ] || [ "$major_version" -gt 3 ]; then | ||
echo "$python_command version is greater than or equal to 3.10" |
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.
please don't echo unnecessary stuff.
also no need to awk/cut... this can be truncated to. makes it more readable.
pyver_check=$(python_command -c "import sys; print(sys.version_info[:2] != (3, 10))")
if [ "$python_version_check" = "True" ]; then
err "Minimum python version is 3.10."
fi
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 think we should display the version of python the user is running if the minimum version doesn't match.
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.
would it matter? it's still unsupported
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.
err "Minimum python version is 3.10. Found $(python_command -V)"
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.
Resolved in e2dd448
- simplify version check command
Description
Please include a summary of the change, the motivation, and any additional context that will help others understand your PR. If it closes one or more open issues, please tag them as described here.
Affected Dependencies
List any dependencies that are required for this change.
How has this been tested?
Checklist