summaryrefslogtreecommitdiffstats
path: root/linux_dpdk
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-09-13 17:30:14 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-09-13 17:30:14 +0300
commit138686f389fe48139ddc4a57ac5de363e71b38e7 (patch)
tree35cc977a555f80ac64c6aff4bbc045819dd080a5 /linux_dpdk
parent58f1ee52761a489322036f111793ddd8e85e197a (diff)
dpdk Python scripts small fixes
ensure log dir exists for trex daemon regression: add trex24 setup Sphinx docs remove "capture" tag for compatibility with 1.2 version
Diffstat (limited to 'linux_dpdk')
-rwxr-xr-xlinux_dpdk/b29
1 files changed, 22 insertions, 7 deletions
diff --git a/linux_dpdk/b b/linux_dpdk/b
index a6eeed6a..4ec2bfba 100755
--- a/linux_dpdk/b
+++ b/linux_dpdk/b
@@ -1,14 +1,29 @@
#! /bin/bash
export WAFLOCK=.lock-wafbuild_dpdk
-if python2.7 waf-1.9.3 --help &> /dev/null ; then
- python2.7 waf-1.9.3 $@
- exit $?
-elif python3 waf-1.9.3 --help &> /dev/null ; then
- python3 waf-1.9.3 $@
- exit $?
+waf=waf-1.9.3
+p2=${PYTHON:-${PYTHON2:-python2.7}}
+p3=${PYTHON3:-python3}
+
+
+# try Pythons which can load waf
+
+if $p2 $waf --help &> /dev/null; then
+ $p2 $waf $@
+elif $p3 $waf --help &> /dev/null; then
+ $p3 $waf $@
+
+# waf can't be loaded, print the error with available Python
+
+elif which $p2 &> /dev/null; then
+ $p2 $waf $@
+elif which $p3 &> /dev/null; then
+ $p3 $waf $@
+
+# no Python available
+
else
- echo Required Python versions at least 2.7 or 3
+ echo Required Python 2.7 or 3
exit 1
fi