summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorTimothy Redaelli <tredaelli@redhat.com>2018-03-08 17:15:37 +0100
committerBen Pfaff <blp@ovn.org>2018-03-08 10:33:19 -0800
commit2c6761dc0dd82d906128d789028c0e0e51a00d78 (patch)
treeb1de7212be4326ca6bc67639a55db01aee4cd4eb /m4
parentd1309588dd3ba914a625690ec226d27d24b9aef3 (diff)
downloadopenvswitch-2c6761dc0dd82d906128d789028c0e0e51a00d78.tar.gz
m4: Try to use "python" as Python2 interpreter only as last resort
This patch tries to find Python 2 as "python2", then "python2.7" and finally "python". This is needed since "/usr/bin/python" is used as Python 3 on some Linux distributions (for example on Arch Linux) and on Fedora 28 "/usr/bin/python" will be deprecated [1]: "All scripts shall explicitly use /usr/bin/python2." [1] https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'm4')
-rw-r--r--m4/openvswitch.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index 78082d4e0..3f301b23b 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
@@ -356,7 +356,7 @@ AC_DEFUN([OVS_CHECK_PYTHON],
ovs_cv_python=$PYTHON
else
ovs_cv_python=no
- for binary in python python2.7; do
+ for binary in python2 python2.7 python; do
ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for dir in $PATH; do
IFS=$ovs_save_IFS