install: Python virtualenv python3 enforcement 97/48397/2
authorRichard Elias <richardx.elias@intel.com>
Tue, 5 Dec 2017 09:55:36 +0000 (09:55 +0000)
committerRichard Elias <richardx.elias@intel.com>
Thu, 7 Dec 2017 11:38:03 +0000 (11:38 +0000)
It was reported that virtualenv-3.x sometimes uses python2.7 instead of
python3. This update of the python virtual environment creation scripts,
enforces the use of python3 from /usr/bin/python3.
The scripts were tested on fresh installations of each currently
supported Linux OS.

JIRA:VSPERF-551

Change-Id: If909dd9578a3c42b14c1a3e4f9ed7b07a675fb58
Signed-off-by: Richard Elias <richardx.elias@intel.com>
Reviewed-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Christian Trautman <ctrautma@redhat.com>
Reviewed-by: Sridhar Rao <sridhar.rao@spirent.com>
Reviewed-by: Trevor Cooper <trevor.cooper@intel.com>
systems/centos/prepare_python_env.sh
systems/fedora/24/prepare_python_env.sh
systems/fedora/25/prepare_python_env.sh
systems/fedora/26/prepare_python_env.sh
systems/opensuse/42.2/prepare_python_env.sh
systems/opensuse/42.3/prepare_python_env.sh
systems/rhel/7.2/prepare_python_env.sh
systems/rhel/7.3/prepare_python_env.sh
systems/ubuntu/14.04/prepare_python_env.sh

index 5777448..8bce53c 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # Prepare Python 3 environment for vsperf execution
 #
-# Copyright 2015 OPNFV
+# Copyright 2015-2017 OPNFV
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ if [ -d "$VSPERFENV_DIR" ] ; then
 fi
 
 scl enable python33 "
-virtualenv "$VSPERFENV_DIR"
+virtualenv "$VSPERFENV_DIR" --python /usr/bin/python3
 source "$VSPERFENV_DIR"/bin/activate
 pip install -r ../requirements.txt
 pip install pylint
index b099df5..920604c 100644 (file)
@@ -23,7 +23,7 @@ fi
 
 # enable virtual environment in a subshell, so QEMU build can use python 2.7
 
-(virtualenv-3.5 "$VSPERFENV_DIR"
+(virtualenv-3.5 "$VSPERFENV_DIR" --python /usr/bin/python3
 source "$VSPERFENV_DIR"/bin/activate
 pip install -r ../requirements.txt
 pip install pylint)
index 4a85eb3..c4613ca 100644 (file)
@@ -23,7 +23,7 @@ fi
 
 # enable virtual environment in a subshell, so QEMU build can use python 2.7
 
-(virtualenv-3.5 "$VSPERFENV_DIR"
+(virtualenv-3.5 "$VSPERFENV_DIR" --python /usr/bin/python3
 source "$VSPERFENV_DIR"/bin/activate
 pip install -r ../requirements.txt
 pip install pylint
index 33615cb..05eedfd 100644 (file)
@@ -23,7 +23,7 @@ fi
 
 # enable virtual environment in a subshell, so QEMU build can use python 2.7
 
-(virtualenv-3.6 "$VSPERFENV_DIR"
+(virtualenv-3.6 "$VSPERFENV_DIR" --python /usr/bin/python3
 source "$VSPERFENV_DIR"/bin/activate
 pip install -r ../requirements.txt
 pip install pylint
index 66f94cf..ab668ca 100755 (executable)
@@ -21,7 +21,7 @@ if [ -d "$VSPERFENV_DIR" ] ; then
     exit
 fi
 
-virtualenv "$VSPERFENV_DIR"
+virtualenv "$VSPERFENV_DIR" --python /usr/bin/python3
 source "$VSPERFENV_DIR"/bin/activate
 pip install -r ../requirements.txt
 pip install pylint
index 66f94cf..ab668ca 100755 (executable)
@@ -21,7 +21,7 @@ if [ -d "$VSPERFENV_DIR" ] ; then
     exit
 fi
 
-virtualenv "$VSPERFENV_DIR"
+virtualenv "$VSPERFENV_DIR" --python /usr/bin/python3
 source "$VSPERFENV_DIR"/bin/activate
 pip install -r ../requirements.txt
 pip install pylint
index bd468d8..0178954 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # Prepare Python environment for vsperf execution on Red Hat 7.2 systems.
 #
-# Copyright 2016 OPNFV, Intel Corporation, Red Hat Inc.
+# Copyright 2016-2017 OPNFV, Intel Corporation, Red Hat Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ if [ -d "$VSPERFENV_DIR" ] ; then
 fi
 
 scl enable python33 "
-virtualenv "$VSPERFENV_DIR"
+virtualenv "$VSPERFENV_DIR" --python /usr/bin/python3
 source "$VSPERFENV_DIR"/bin/activate
 pip install -r ../requirements.txt
 pip install pylint
index 3ba049e..a902145 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # Prepare Python environment for vsperf execution on RHEL 7.3 systems.
 #
-# Copyright 2016 OPNFV, Intel Corporation, Red Hat Inc.
+# Copyright 2016-2017 OPNFV, Intel Corporation, Red Hat Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ if [ -d "$VSPERFENV_DIR" ] ; then
 fi
 
 scl enable python33 "
-virtualenv "$VSPERFENV_DIR"
+virtualenv "$VSPERFENV_DIR" --python /usr/bin/python3
 source "$VSPERFENV_DIR"/bin/activate
 pip install -r ../requirements.txt
 pip install pylint
index 6ef8680..4c98dc4 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # Prepare Python environment for vsperf execution on Ubuntu 14.04 systems
 #
-# Copyright 2015 OPNFV, Intel Corporation.
+# Copyright 2015-2017 OPNFV, Intel Corporation.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@ fi
 
 # enable virtual environment in a subshell, so QEMU build can use python 2.7
 
-(virtualenv "$VSPERFENV_DIR"
+(virtualenv "$VSPERFENV_DIR" --python /usr/bin/python3
 source "$VSPERFENV_DIR"/bin/activate
 pip install -r ../requirements.txt
 pip install pylint)