All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit e4094ed3 authored by David Johnson's avatar David Johnson

Be more selective in python version extraction in configure.

... where "selective" means | head -1.  Some pythons spew not only their
version but also the compiler version, so we were getting a multi-line
value for PYTHON_VERSION in some places, which breaks the generated
GNUMakefiles.  configure must be setting some env var that is causing
newer or custom-built pythons to produce this extra information.
Anyway, head -1 should be a fine strategy.
parent 53f6e98b
......@@ -4239,7 +4239,7 @@ if test x"$PYTHON" = x""; then
as_fn_error $? "python not detected" "$LINENO" 5
fi
PYTHON_VERSION=`${PYTHON} -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2`
PYTHON_VERSION=`${PYTHON} -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2 | head -1`
PYTHON_PATH=`dirname ${PYTHON}`
if test ! -d "$PYTHON_PATH/include"; then
PYTHON_PATH=`dirname ${PYTHON_PATH}`
......
......@@ -207,7 +207,7 @@ if test x"$PYTHON" = x""; then
AC_MSG_ERROR([python not detected])
fi
PYTHON_VERSION=`${PYTHON} -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2`
PYTHON_VERSION=`${PYTHON} -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2 | head -1`
PYTHON_PATH=`dirname ${PYTHON}`
if test ! -d "$PYTHON_PATH/include"; then
PYTHON_PATH=`dirname ${PYTHON_PATH}`
......
......@@ -2765,7 +2765,7 @@ if test x"$PYTHON" = x""; then
as_fn_error $? "python not detected" "$LINENO" 5
fi
PYTHON_VERSION=`${PYTHON} -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2`
PYTHON_VERSION=`${PYTHON} -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2 | head -1`
PYTHON_PATH=`dirname ${PYTHON}`
if test ! -d "$PYTHON_PATH/include"; then
PYTHON_PATH=`dirname ${PYTHON_PATH}`
......
......@@ -83,7 +83,7 @@ if test x"$PYTHON" = x""; then
AC_MSG_ERROR([python not detected])
fi
PYTHON_VERSION=`${PYTHON} -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2`
PYTHON_VERSION=`${PYTHON} -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2 | head -1`
PYTHON_PATH=`dirname ${PYTHON}`
if test ! -d "$PYTHON_PATH/include"; then
PYTHON_PATH=`dirname ${PYTHON_PATH}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment