Message ID | 20181215205407.78688-1-aduskett@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [v2,1/2] dependencies.sh: Check for a host python version >= 2.7 | expand |
diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index 58c34d880f..d0b6bdc23a 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -181,6 +181,14 @@ if test "${missing_progs}" = "yes" ; then exit 1 fi +# Check that the python version is at least 2.7 +PYTHON_VERSION=$(python -V 2>&1 |awk '{print $2}') +if [ $(echo $PYTHON_VERSION |sed -e 's/\.//g') -lt 2700 ]; then + echo + echo "You have python '$PYTHON_VERSION' installed. Python >= 2.7 is required" + exit 1; +fi + if grep ^BR2_NEEDS_HOST_UTF8_LOCALE=y $BR2_CONFIG > /dev/null; then if ! which locale > /dev/null ; then echo