]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
build_utils.sh: Prefer python3 instead of python2 for virtualenvs 1774/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 4 Mar 2021 14:51:56 +0000 (09:51 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 18 Mar 2021 19:03:49 +0000 (15:03 -0400)
https://github.com/ceph/ceph-build/blob/master/scripts/build_utils.sh#L94-L105

Signed-off-by: David Galloway <dgallowa@redhat.com>
scripts/build_utils.sh

index 62541041832370377884d4c553b0fcad8e8b059d..a61da2536cba18f97fab171d37180d306420d505 100644 (file)
@@ -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
 }