Skip to content

Commit

Permalink
Added Python checks
Browse files Browse the repository at this point in the history
  • Loading branch information
smotherh committed May 2, 2018
1 parent 837e9e0 commit e932f3b
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,24 @@ git submodule init
git submodule update
cd search/pybinds/

if hash python 2>/dev/null; then
if python -c 'import sys; print(sys.version_info[0])' | grep -q 3; then
echo "Python version 3 confirmed"
else
echo "Python detected, but it must be version 3.x";
exit 1;
fi
else
echo "Python not found"
exit 1;
fi


# Check for cmake version 3 under "cmake" and "cmake3"
if hash cmake 2>/dev/null; then
cmake ./
elif hash cmake3 2>/dev/null; then
if hash cmake3 2>/dev/null; then
cmake3 ./
elif hash cmake 2>/dev/null; then
cmake ./
else
echo >&2 "Cannot find cmake. Aborting..."
exit 1
Expand Down

0 comments on commit e932f3b

Please sign in to comment.