From 08408ed943e9fe6d99a061894c2174e3a40b123a Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Sat, 15 Sep 2018 01:40:28 +0200 Subject: [PATCH] common/environment/setup/python.sh: always expose py{2,3}_* vars Their values are static now, so remove the tests. --- common/environment/setup/python.sh | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/common/environment/setup/python.sh b/common/environment/setup/python.sh index 939293aa953..d1f4d49a10a 100644 --- a/common/environment/setup/python.sh +++ b/common/environment/setup/python.sh @@ -1,22 +1,17 @@ # # Useful variables for determining Python version and paths. # -__python2="/usr/bin/python2" -__python3="/usr/bin/python3" # set version 2 as the default Python python_version="2" -if [ -x ${__python2} ]; then - py2_ver="2.7" - py2_lib="/usr/lib/python${py2_ver}" - py2_sitelib="${py2_lib}/site-packages" - py2_inc="/usr/include/python${py2_ver}" -fi -if [ -x ${__python3} ]; then - py3_ver="3.6" - py3_abiver="m" - py3_lib="/usr/lib/python${py3_ver}" - py3_sitelib="${py3_lib}/site-packages" - py3_inc="/usr/include/python${py3_ver}${py3_abiver}" -fi +py2_ver="2.7" +py2_lib="/usr/lib/python${py2_ver}" +py2_sitelib="${py2_lib}/site-packages" +py2_inc="/usr/include/python${py2_ver}" + +py3_ver="3.6" +py3_abiver="m" +py3_lib="/usr/lib/python${py3_ver}" +py3_sitelib="${py3_lib}/site-packages" +py3_inc="/usr/include/python${py3_ver}${py3_abiver}"