diff --git a/gitlab/before_build.sh b/gitlab/before_build.sh index e2a1cc57b69fcd378834ceae8050a40e68a370b1..18a5f7792d9d8ea3596d0f22aac62074e64afe4d 100755 --- a/gitlab/before_build.sh +++ b/gitlab/before_build.sh @@ -11,7 +11,8 @@ check_env WHEELS_SERVER # Readies the virtualenv to use for installation if [ ! -d ${PREFIX} ]; then log_info "Creating virtualenv installation at ${PREFIX}..." - run_cmd ${BOB_PREFIX_PATH}/bin/virtualenv --system-site-packages ${PREFIX} + run_cmd_ld ${BOB_PREFIX_PATH}/bin/virtualenv --system-site-packages ${PREFIX} + fix_venv else log_warn "Prefix directory ${PREFIX} exists, not re-installing..." fi diff --git a/gitlab/functions.sh b/gitlab/functions.sh index f66afab0808b6d70c04417c783d0fe42bcd49258..0b360ac4364fb05991d2e840e6267d25962b2e1f 100644 --- a/gitlab/functions.sh +++ b/gitlab/functions.sh @@ -104,6 +104,24 @@ EOT } +# Fixes the python prompt by setting LD_LIBRARY_PATH permanently +fix_venv() { + + local py=${PREFIX}/bin/python + + case ${PYVER} in + py3*) py=${py}3 ;; + esac + + mv ${py} ${py}.orig + cat <<EOT >> ${py} +#!/usr/bin/env bash +LD_LIBRARY_PATH=${BOB_PREFIX_PATH}/lib ${py}.orig +EOT + run_cmd chmod 755 ${py} +} + + # Uploads a file to our intranet location via curl doc_upload() { log_info "curl: ${1} -> ${DOCSERVER}/${2}..."