configure: detect python major version

For informational purposes only when notifying what Python
modules are required during ./configure.
pull/4290/head
Jason Ish 5 years ago committed by Victor Julien
parent 00ad7a911f
commit c4b856ea99

@ -121,6 +121,12 @@
fi
AM_CONDITIONAL([HAVE_PYTHON], [test "x$enable_python" = "xyes"])
# Get the Python major version. This is only for information
# messages displayed during configure.
if test "x$HAVE_PYTHON" != "xno"; then
pymv="$($HAVE_PYTHON -c 'import sys; print(sys.version_info.major);')"
fi
# Check for python-distutils (setup).
have_python_distutils="no"
if test "x$enable_python" = "xyes"; then
@ -139,7 +145,7 @@
echo " Warning: Python distutils not found. Python tools will"
echo " not be installed."
echo ""
echo " Ubuntu/Debian: apt install `basename ${HAVE_PYTHON}`-distutils"
echo " Please install the distutils module for Python ${pymv}."
echo ""
fi

Loading…
Cancel
Save