Skip to content

Commit

Permalink
configure: Check for version of pytest
Browse files Browse the repository at this point in the history
Addresses ElementsProject#486 and takes into account @rustyrussell 's
comment about PYTEST defined in the environment which
always overrides without checking the version.
  • Loading branch information
Jan Sarenik authored and cdecker committed Jun 14, 2018
1 parent f8da37f commit 40ea74b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 40ea74b

Please sign in to comment.