]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: stop preparing wheels for python2
authorKefu Chai <kchai@redhat.com>
Wed, 18 Dec 2019 10:33:24 +0000 (18:33 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 19 Dec 2019 03:52:56 +0000 (11:52 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
install-deps.sh

index a8ae948ffc4195a679c235667375a86e338f4ba1..0f0c6c6780975ca7f07da206a4478d89afc45205 100755 (executable)
@@ -466,19 +466,18 @@ function populate_wheelhouse() {
 
 function activate_virtualenv() {
     local top_srcdir=$1
-    local interpreter=$2
-    local env_dir=$top_srcdir/install-deps-$interpreter
+    local env_dir=$top_srcdir/install-deps-python3
 
     if ! test -d $env_dir ; then
         # Make a temporary virtualenv to get a fresh version of virtualenv
         # because CentOS 7 has a buggy old version (v1.10.1)
         # https://github.com/pypa/virtualenv/issues/463
-        virtualenv ${env_dir}_tmp
+        virtualenv --python=python3 ${env_dir}_tmp
         # install setuptools before upgrading virtualenv, as the latter needs
         # a recent setuptools for setup commands like `extras_require`.
         ${env_dir}_tmp/bin/pip install --upgrade setuptools
         ${env_dir}_tmp/bin/pip install --upgrade virtualenv
-        ${env_dir}_tmp/bin/virtualenv --python $interpreter $env_dir
+        ${env_dir}_tmp/bin/virtualenv --python python3 $env_dir
         rm -rf ${env_dir}_tmp
 
         . $env_dir/bin/activate
@@ -506,11 +505,9 @@ function preload_wheels_for_tox() {
         fi
     fi
     if test "$require" && ! test -d wheelhouse ; then
-        for interpreter in python2.7 python3 ; do
-            type $interpreter > /dev/null 2>&1 || continue
-            activate_virtualenv $top_srcdir $interpreter || exit 1
-            populate_wheelhouse "wheel -w $wip_wheelhouse" $require $constraint || exit 1
-        done
+        type python3 > /dev/null 2>&1 || continue
+        activate_virtualenv $top_srcdir || exit 1
+        populate_wheelhouse "wheel -w $wip_wheelhouse" $require $constraint || exit 1
         mv $wip_wheelhouse wheelhouse
         md5sum $require_files $constraint_files > $md5
     fi
@@ -531,9 +528,7 @@ if $for_make_check; then
     find . -name tox.ini | while read ini ; do
         preload_wheels_for_tox $ini
     done
-    for interpreter in python2.7 python3 ; do
-        rm -rf $top_srcdir/install-deps-$interpreter
-    done
+    rm -rf $top_srcdir/install-deps-python3
     rm -rf $XDG_CACHE_HOME
     git --version || (echo "Dashboard uses git to pull dependencies." ; false)
 fi