build: Move python detection back into waf (instead of in configure and Makefile)
authorAndrew Bartlett <abartlet@samba.org>
Tue, 11 Dec 2018 18:10:30 +0000 (07:10 +1300)
committerNoel Power <npower@samba.org>
Fri, 14 Dec 2018 13:40:19 +0000 (14:40 +0100)
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 <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
15 files changed:
Makefile
buildtools/bin/waf
configure
ctdb/Makefile
ctdb/configure
lib/ldb/Makefile
lib/ldb/configure
lib/replace/Makefile
lib/replace/configure
lib/talloc/Makefile
lib/talloc/configure
lib/tdb/Makefile
lib/tdb/configure
lib/tevent/Makefile
lib/tevent/configure

index c13843d3a4b59b7e00a0acf84e2a6fe33b2aadb7..c2de1df7b608c9e6c79ec52659f53ce4ee788867 100644 (file)
--- 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)
 
index e3c0cb5563dd052af14fa298f1b23a749c3ba382..3ee4d5bc4dfbe851e255568fc60d98052e227ebc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # encoding: latin-1
 # Thomas Nagy, 2005-2018
 #
index 6a89b17e73301e71e2a4763f7aac21956c8af879..a6ca50feb4702929fa499d516977fce235fa0789 100755 (executable)
--- 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
index 142998a96525a461f97f07079a01c03478c8e68f..ec362e2940827160b65164b6d01ae2f0d4171139 100644 (file)
@@ -1,6 +1,5 @@
 # simple makefile wrapper to run waf
 
-PYTHON?=python3
 WAF_BINARY=$(PYTHON) ../buildtools/bin/waf
 WAF=WAF_MAKE=1 $(WAF_BINARY)
 
index 370ddccb6a5630759d21a6292e1c514b139d547b..dbb0c1446b512d3fd85864d9b9b5272f46fd8a91 100755 (executable)
@@ -11,5 +11,5 @@ JOBS=1
 export JOBS
 
 cd . || exit 1
-${PYTHON:=python3} $WAF configure "$@" || exit 1
+$PYTHON $WAF configure "$@" || exit 1
 cd $PREVPATH
index 0ac14aae74e46234580f472dcf8cdc042edce0e8..18ef459eb16e6257ef4b51309e0bbcdc60d02a46 100644 (file)
@@ -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)
 
index 8625206d611bc62fb8d56b03dd6426d60206e018..6c931bfbf5e21259726280d7766bb33dc276ec71 100755 (executable)
@@ -17,5 +17,5 @@ JOBS=1
 export JOBS
 
 cd . || exit 1
-${PYTHON:=python3} $WAF configure "$@" || exit 1
+$PYTHON $WAF configure "$@" || exit 1
 cd $PREVPATH
index 3e54a16927cf422a3eefc7ae856e7944c8412732..a123a37b937213be67c71fe65edb97123d6ed8e1 100644 (file)
@@ -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)
 
index 69bbc4a1bae392f891b0b54a67a9c8c38d59991b..d8a8d2ac2f393aa0a00f847f62ecc323c38bd07e 100755 (executable)
@@ -17,5 +17,5 @@ JOBS=1
 export JOBS
 
 cd . || exit 1
-${PYTHON:=python3} $WAF configure "$@" || exit 1
+$PYTHON $WAF configure "$@" || exit 1
 cd $PREVPATH
index 7cfac0cafc96b50b2878b93b9bedb5243747c724..36048e56e2d48b05273d681769e87b563f81ecb8 100644 (file)
@@ -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)
 
index 69bbc4a1bae392f891b0b54a67a9c8c38d59991b..d8a8d2ac2f393aa0a00f847f62ecc323c38bd07e 100755 (executable)
@@ -17,5 +17,5 @@ JOBS=1
 export JOBS
 
 cd . || exit 1
-${PYTHON:=python3} $WAF configure "$@" || exit 1
+$PYTHON $WAF configure "$@" || exit 1
 cd $PREVPATH
index 0f088ea2231149335c8246aa7cc582e83aa26732..3e70146c248c80cd01a948e82a478acc86eaa0f8 100644 (file)
@@ -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)
 
index 69bbc4a1bae392f891b0b54a67a9c8c38d59991b..d8a8d2ac2f393aa0a00f847f62ecc323c38bd07e 100755 (executable)
@@ -17,5 +17,5 @@ JOBS=1
 export JOBS
 
 cd . || exit 1
-${PYTHON:=python3} $WAF configure "$@" || exit 1
+$PYTHON $WAF configure "$@" || exit 1
 cd $PREVPATH
index 989f4b9845caa16533bef4b135d27a9f345c4094..c3676a4f42574f299f649f6f1586651a4a205c1e 100644 (file)
@@ -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)
 
index df0bdac0ed09dead4273861943c3ab389ba2ba3e..c3c444754e3d5524529b7e1592fb0e3dbec4aeb5 100755 (executable)
@@ -17,5 +17,5 @@ JOBS=1
 export JOBS
 
 cd . || exit 1
-${PYTHON:=python3} $WAF configure "$@" || exit 1
+$PYTHON $WAF configure "$@" || exit 1
 cd $PREVPATH