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

Improve virtualenv support

parent 82c6ce0a
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,8 @@ check_env WHEELS_SERVER ...@@ -11,7 +11,8 @@ check_env WHEELS_SERVER
# Readies the virtualenv to use for installation # Readies the virtualenv to use for installation
if [ ! -d ${PREFIX} ]; then if [ ! -d ${PREFIX} ]; then
log_info "Creating virtualenv installation at ${PREFIX}..." 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 else
log_warn "Prefix directory ${PREFIX} exists, not re-installing..." log_warn "Prefix directory ${PREFIX} exists, not re-installing..."
fi fi
......
...@@ -104,6 +104,24 @@ EOT ...@@ -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 # Uploads a file to our intranet location via curl
doc_upload() { doc_upload() {
log_info "curl: ${1} -> ${DOCSERVER}/${2}..." log_info "curl: ${1} -> ${DOCSERVER}/${2}..."
......
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