From 52e6887653755f3555fa9028dea3cf6f3819bf28 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Thu, 4 Mar 2021 09:51:56 -0500 Subject: [PATCH] build_utils.sh: Prefer python3 instead of python2 for virtualenvs https://github.com/ceph/ceph-build/blob/master/scripts/build_utils.sh#L94-L105 Signed-off-by: David Galloway --- scripts/build_utils.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 62541041..a61da253 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -96,10 +96,12 @@ create_virtualenv () { if [ "$(ls -A $path)" ]; then echo "Will reuse existing virtual env: $path" else - if [ $(command -v python2.7) ]; then + if [ $(command -v python3) ]; then + virtualenv -p python3 $path + elif [ $(command -v python2.7) ]; then virtualenv -p python2.7 $path else - virtualenv -p python3 $path + virtualenv -p python $path fi fi } -- 2.47.3