From a2420dc0c5613fe617adea6e7f0739557299d70f Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.anjos@idiap.ch> Date: Fri, 23 Sep 2016 17:32:21 +0200 Subject: [PATCH] Tries to use virtualenv instead of conda for scratch environments --- gitlab/before_build.sh | 22 ++++++---------------- gitlab/before_test.sh | 7 +++---- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/gitlab/before_build.sh b/gitlab/before_build.sh index 0535c43..e2a1cc5 100755 --- a/gitlab/before_build.sh +++ b/gitlab/before_build.sh @@ -8,27 +8,17 @@ WHEELS_SERVER=`echo ${DOCSERVER} | sed 's;https\?://;;'` check_env WHEELS_REPOSITORY check_env WHEELS_SERVER -# Clones the conda dev environment to use +# Readies the virtualenv to use for installation if [ ! -d ${PREFIX} ]; then - log_info "Downloading environment list into file \`env.txt'..." - run_cmd curl --silent --output env.txt https://gitlab.idiap.ch/bob/bob.admin/raw/master/install/${ARCH}/devel-${PYVER}.txt - log_info "Bootstrapping conda installation at ${PREFIX}..." - run_cmd ${CONDA_FOLDER}/bin/conda clean --lock - run_cmd ${CONDA_FOLDER}/bin/conda create --prefix ${PREFIX} --file env.txt --yes - - # Dirty fix to libjpeg.8 compilation issues: - # https://github.com/ContinuumIO/anaconda-issues/issues/1042 - if [ "${ARCH}" == "macosx" ] && [ -e "${PREFIX}/lib/libjpeg.8.dylib" ]; then - run_cmd install_name_tool -id @rpath/libjpeg.8.dylib ${PREFIX}/lib/libjpeg.8.dylib - fi + log_info "Creating virtualenv installation at ${PREFIX}..." + run_cmd ${BOB_PREFIX_PATH}/bin/virtualenv --system-site-packages ${PREFIX} else log_warn "Prefix directory ${PREFIX} exists, not re-installing..." fi -# Source the newly created conda environment -log_info "Running \"source ${CONDA_FOLDER}/bin/activate ${PREFIX}\"..." -source ${CONDA_FOLDER}/bin/activate ${PREFIX} -log_info "Environment ${PREFIX} activated" +# Source the newly created virtualenv +log_info "$ source ${PREFIX}/bin/activate" +source ${PREFIX}/bin/activate # Verify where pip is installed use_pip=`which pip` diff --git a/gitlab/before_test.sh b/gitlab/before_test.sh index f24b8ed..80cf712 100755 --- a/gitlab/before_test.sh +++ b/gitlab/before_test.sh @@ -8,10 +8,9 @@ source $(dirname ${0})/functions.sh run_cmd $(dirname ${0})/before_build.sh -# Source the newly created conda environment -log_info "Running \"source ${CONDA_FOLDER}/bin/activate ${PREFIX}\"..." -source ${CONDA_FOLDER}/bin/activate ${PREFIX} -log_info "Environment ${PREFIX} activated" +# Source the newly created virtualenv +log_info "$ source ${PREFIX}/bin/activate" +source ${PREFIX}/bin/activate # Verify where pip is installed use_pip=`which pip` -- GitLab