]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps: Get the latest virtualenv in a temporary folder
authorOleh Prypin <oleh@pryp.in>
Wed, 13 Jul 2016 22:06:51 +0000 (01:06 +0300)
committerJosh Durgin <jdurgin@redhat.com>
Fri, 15 Jul 2016 17:37:24 +0000 (10:37 -0700)
to work around a bug in old virtualenv

Signed-off-by: Oleh Prypin <oleh@pryp.in>
(cherry picked from commit 2699b6d89b8c1c193fd86b5233d1ea86458753a0)

install-deps.sh

index fbb5ae7b004f00c76d7c89926d84e34893e9f044..129178fd0be612142f5a2dba941968b7c18b316e 100755 (executable)
@@ -109,7 +109,14 @@ function activate_virtualenv() {
     local env_dir=$top_srcdir/install-deps-$interpreter
 
     if ! test -d $env_dir ; then
-        virtualenv --python $interpreter $env_dir
+        # 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
+        ${env_dir}_tmp/bin/pip install --upgrade virtualenv
+        ${env_dir}_tmp/bin/virtualenv --python $interpreter $env_dir
+        rm -rf ${env_dir}_tmp
+
         . $env_dir/bin/activate
         if ! populate_wheelhouse install ; then
             rm -rf $env_dir