Skip to content
Snippets Groups Projects
Commit a2420dc0 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Tries to use virtualenv instead of conda for scratch environments

parent 7ed94563
No related branches found
No related tags found
No related merge requests found
......@@ -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`
......
......@@ -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`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment