-
Notifications
You must be signed in to change notification settings - Fork 0
feat: added python/pip version check to make install #165
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
base: main
Are you sure you want to change the base?
Conversation
Great job, no security vulnerabilities found in this Pull Request |
@echo "Checking python version, venv and pip availability..." | ||
@python3 -c 'import sys; exit(0 if sys.version_info >= (3,10) else 1)' \ | ||
|| (echo "You need Python 3.10 or higher. Please install it, e.g.: \n sudo apt install python3.10 python3.10-venv python3.10-dev" && exit 1) | ||
@(python3 -m venv --help >/dev/null 2>&1 && python3 -m pip --version >/dev/null 2>&1) \ | ||
|| (echo "Python venv and/or pip are not available. Please install them, e.g.: \n sudo apt install python3.10-venv python3.10-dev python3-pip" && exit 1) | ||
|
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.
this won't work on macOS
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.
in general this is still a suboptimal solution, because we need specific things installed on the host, and we can't really control them. the way forward is to use something like uv
to manage all the deps we need internally
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.
by saying it won't work because the commands a bad, i.e. you have to use 'brew' instead? But the makefile will actually run, correct? if so maybe we check in and update later
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.
or you saying version check may fail incorrectly, just causing install to fail where it wouldn't have?
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.
this line:
@python3 -c 'import sys; exit(0 if sys.version_info >= (3,10) else 1)' \
is problematic, for example, on my computer:
❯ python3 --version
Python 3.9.6
Make install was failing on bad python version or if missing python with pip. Added checks for that.