Skip to content
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

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

shubham3121
Copy link
Member

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?

  • Describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • List any relevant details for your test configuration.

Checklist

syftbox/server/templates/install.sh Show resolved Hide resolved

# 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"
Copy link
Collaborator

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

Copy link
Member Author

@shubham3121 shubham3121 Oct 16, 2024

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.

Copy link
Collaborator

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

Copy link
Collaborator

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)"

Copy link
Member Author

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
@yashgorana yashgorana merged commit 0cdd8df into main Oct 16, 2024
7 checks passed
@yashgorana yashgorana deleted the shubham/check-py-ver branch October 16, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants