From 5ddff307b4af5c82d5064745f5bd2c33bd340ced Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 12 Dec 2018 07:10:30 +1300 Subject: [PATCH] build: Move python detection back into waf (instead of in configure and Makefile) This avoids creating a mini-configure in the configure script. Users wishing to use python2 to build need to specify PYTHON= to both ./configure and make After we merged the python3 change, it became clear that relying on systems prefixing the correct python just causes trouble and make debugging harder, so only use $PYTHON for the override, not the default case This essentially reverts a660b7fb8e519bd3be558fd0425bff8f287fca1f but leaves the files more consistent. Signed-off-by: Andrew Bartlett Reviewed-by: Noel Power --- Makefile | 1 - buildtools/bin/waf | 2 +- configure | 2 +- ctdb/Makefile | 1 - ctdb/configure | 2 +- lib/ldb/Makefile | 1 - lib/ldb/configure | 2 +- lib/replace/Makefile | 1 - lib/replace/configure | 2 +- lib/talloc/Makefile | 1 - lib/talloc/configure | 2 +- lib/tdb/Makefile | 1 - lib/tdb/configure | 2 +- lib/tevent/Makefile | 1 - lib/tevent/configure | 2 +- 15 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index c13843d3a4b..c2de1df7b60 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ # simple makefile wrapper to run waf -PYTHON?=python3 WAF_BINARY=$(PYTHON) ./buildtools/bin/waf WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY) diff --git a/buildtools/bin/waf b/buildtools/bin/waf index e3c0cb5563d..3ee4d5bc4df 100755 --- a/buildtools/bin/waf +++ b/buildtools/bin/waf @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # encoding: latin-1 # Thomas Nagy, 2005-2018 # diff --git a/configure b/configure index 6a89b17e733..a6ca50feb47 100755 --- a/configure +++ b/configure @@ -13,5 +13,5 @@ export JOBS unset LD_PRELOAD cd . || exit 1 -${PYTHON:=python3} $WAF configure "$@" || exit 1 +$PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/ctdb/Makefile b/ctdb/Makefile index 142998a9652..ec362e29408 100644 --- a/ctdb/Makefile +++ b/ctdb/Makefile @@ -1,6 +1,5 @@ # simple makefile wrapper to run waf -PYTHON?=python3 WAF_BINARY=$(PYTHON) ../buildtools/bin/waf WAF=WAF_MAKE=1 $(WAF_BINARY) diff --git a/ctdb/configure b/ctdb/configure index 370ddccb6a5..dbb0c1446b5 100755 --- a/ctdb/configure +++ b/ctdb/configure @@ -11,5 +11,5 @@ JOBS=1 export JOBS cd . || exit 1 -${PYTHON:=python3} $WAF configure "$@" || exit 1 +$PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/lib/ldb/Makefile b/lib/ldb/Makefile index 0ac14aae74e..18ef459eb16 100644 --- a/lib/ldb/Makefile +++ b/lib/ldb/Makefile @@ -1,6 +1,5 @@ # simple makefile wrapper to run waf -PYTHON?=python3 WAF_BINARY=$(PYTHON) ../../buildtools/bin/waf WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY) diff --git a/lib/ldb/configure b/lib/ldb/configure index 8625206d611..6c931bfbf5e 100755 --- a/lib/ldb/configure +++ b/lib/ldb/configure @@ -17,5 +17,5 @@ JOBS=1 export JOBS cd . || exit 1 -${PYTHON:=python3} $WAF configure "$@" || exit 1 +$PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/lib/replace/Makefile b/lib/replace/Makefile index 3e54a16927c..a123a37b937 100644 --- a/lib/replace/Makefile +++ b/lib/replace/Makefile @@ -1,6 +1,5 @@ # simple makefile wrapper to run waf -PYTHON?=python3 WAF_BINARY=$(PYTHON) ../../buildtools/bin/waf WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY) diff --git a/lib/replace/configure b/lib/replace/configure index 69bbc4a1bae..d8a8d2ac2f3 100755 --- a/lib/replace/configure +++ b/lib/replace/configure @@ -17,5 +17,5 @@ JOBS=1 export JOBS cd . || exit 1 -${PYTHON:=python3} $WAF configure "$@" || exit 1 +$PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/lib/talloc/Makefile b/lib/talloc/Makefile index 7cfac0cafc9..36048e56e2d 100644 --- a/lib/talloc/Makefile +++ b/lib/talloc/Makefile @@ -1,6 +1,5 @@ # simple makefile wrapper to run waf -PYTHON?=python3 WAF_BINARY=$(PYTHON) ../../buildtools/bin/waf WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY) diff --git a/lib/talloc/configure b/lib/talloc/configure index 69bbc4a1bae..d8a8d2ac2f3 100755 --- a/lib/talloc/configure +++ b/lib/talloc/configure @@ -17,5 +17,5 @@ JOBS=1 export JOBS cd . || exit 1 -${PYTHON:=python3} $WAF configure "$@" || exit 1 +$PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/lib/tdb/Makefile b/lib/tdb/Makefile index 0f088ea2231..3e70146c248 100644 --- a/lib/tdb/Makefile +++ b/lib/tdb/Makefile @@ -1,6 +1,5 @@ # simple makefile wrapper to run waf -PYTHON?=python3 WAF_BINARY=$(PYTHON) ../../buildtools/bin/waf WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY) diff --git a/lib/tdb/configure b/lib/tdb/configure index 69bbc4a1bae..d8a8d2ac2f3 100755 --- a/lib/tdb/configure +++ b/lib/tdb/configure @@ -17,5 +17,5 @@ JOBS=1 export JOBS cd . || exit 1 -${PYTHON:=python3} $WAF configure "$@" || exit 1 +$PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/lib/tevent/Makefile b/lib/tevent/Makefile index 989f4b9845c..c3676a4f425 100644 --- a/lib/tevent/Makefile +++ b/lib/tevent/Makefile @@ -1,5 +1,4 @@ # simple makefile wrapper to run waf -PYTHON?=python3 WAF_BINARY=$(PYTHON) ../../buildtools/bin/waf WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY) diff --git a/lib/tevent/configure b/lib/tevent/configure index df0bdac0ed0..c3c444754e3 100755 --- a/lib/tevent/configure +++ b/lib/tevent/configure @@ -17,5 +17,5 @@ JOBS=1 export JOBS cd . || exit 1 -${PYTHON:=python3} $WAF configure "$@" || exit 1 +$PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH -- 2.34.1