configure: Check for version of pytest
Addresses #486 and takes into account @rustyrussell 's comment about PYTEST defined in the environment which always overrides without checking the version.
This commit is contained in:
committed by
Christian Decker
parent
f8da37fff0
commit
40ea74ba99
3
configure
vendored
3
configure
vendored
@@ -66,6 +66,7 @@ find_pytest()
|
||||
PYTEST_BINS="pytest-3 pytest3 pytest py.test"
|
||||
for p in $PYTEST_BINS; do
|
||||
if [ "$(which $p)" != "" ] ; then
|
||||
"$p" --version 2>&1 | grep -q "python3" || continue
|
||||
echo "$p"
|
||||
return
|
||||
fi
|
||||
@@ -117,8 +118,6 @@ rm -f $CONFIG_VAR_FILE.$$
|
||||
$CONFIGURATOR --autotools-style --var-file=$CONFIG_VAR_FILE.$$ --header-file=$CONFIG_HEADER --configurator-cc="$CONFIGURATOR_CC" "$CC" $CWARNFLAGS $CDEBUGFLAGS
|
||||
mv $CONFIG_VAR_FILE.$$ $CONFIG_VAR_FILE
|
||||
|
||||
find_pytest
|
||||
|
||||
add_var PREFIX "$PREFIX"
|
||||
add_var CC "$CC"
|
||||
add_var CONFIGURATOR_CC "$CONFIGURATOR_CC"
|
||||
|
||||
Reference in New Issue
Block a user