From eb583cbbbf1ec3e0abc730130afaf084ed9d0828 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Wed, 23 Mar 2016 17:56:37 +0100 Subject: [PATCH] build/ops: in jessie virtualenv is in package virtualenv The python scripts are not yet compatible with python3, yet it is the default on jessie. Force the creation of the virtualenv to use python2.7 instead. The wheelhouse is already explicitly populated for both python3 and python2.7 by install-deps.sh, regardless of the default interpreter. Signed-off-by: Loic Dachary --- debian/control | 2 +- qa/workunits/ceph-helpers.sh | 4 ++-- src/test/debian-jessie/Dockerfile.in | 2 +- src/tools/setup-virtualenv.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/control b/debian/control index 48ee6730eca67..d28933b901bc0 100644 --- a/debian/control +++ b/debian/control @@ -57,7 +57,7 @@ Build-Depends: autoconf, python-nose, python-setuptools, python-sphinx, - python-virtualenv, + python-virtualenv | virtualenv, sdparm | hdparm, uuid-runtime, valgrind, diff --git a/qa/workunits/ceph-helpers.sh b/qa/workunits/ceph-helpers.sh index 759da39329335..d931b2cdc1850 100755 --- a/qa/workunits/ceph-helpers.sh +++ b/qa/workunits/ceph-helpers.sh @@ -1313,7 +1313,7 @@ function main() { shopt -s -o xtrace PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: ' - export PATH=ceph-disk/virtualenv/bin:ceph-detect-init/virtualenv/bin:.:$PATH # make sure program from sources are prefered + export PATH=ceph-disk/ceph-disk-virtualenv/bin:ceph-detect-init/ceph-detect-init-virtualenv/bin:.:$PATH # make sure program from sources are prefered export CEPH_CONF=/dev/null unset CEPH_ARGS @@ -1335,7 +1335,7 @@ function run_tests() { shopt -s -o xtrace PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: ' - export PATH=ceph-disk/virtualenv/bin:ceph-detect-init/virtualenv/bin:.:$PATH # make sure program from sources are prefered + export PATH=ceph-disk/ceph-disk-virtualenv/bin:ceph-detect-init/ceph-detect-init-virtualenv/bin:.:$PATH # make sure program from sources are prefered export CEPH_MON="127.0.0.1:7109" # git grep '\<7109\>' : there must be only one export CEPH_ARGS diff --git a/src/test/debian-jessie/Dockerfile.in b/src/test/debian-jessie/Dockerfile.in index 59f9072fdd5d3..9735716f793ea 100644 --- a/src/test/debian-jessie/Dockerfile.in +++ b/src/test/debian-jessie/Dockerfile.in @@ -27,5 +27,5 @@ RUN apt-get update # build dependencies RUN cd /root ; ./install-deps.sh # development tools -RUN apt-get install -y ccache valgrind gdb python-virtualenv gdisk kpartx hdparm jq xmlstarlet +RUN apt-get install -y sudo ccache valgrind gdb python-virtualenv gdisk kpartx hdparm jq xmlstarlet RUN if test %%USER%% != root ; then useradd -M --uid %%user_id%% %%USER%% && echo '%%USER%% ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers ; fi diff --git a/src/tools/setup-virtualenv.sh b/src/tools/setup-virtualenv.sh index 62789d41d9835..9ff2d26852b1f 100755 --- a/src/tools/setup-virtualenv.sh +++ b/src/tools/setup-virtualenv.sh @@ -18,7 +18,7 @@ DIR=$1 rm -fr $DIR mkdir -p $DIR -virtualenv $DIR +virtualenv --python python2.7 $DIR . $DIR/bin/activate # older versions of pip will not install wrap_console scripts # when using wheel packages -- 2.39.5