From 1c82f04e3efb80fc37f71819e7d2605a496189bb Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Sat, 24 Sep 2016 08:27:16 +0200
Subject: [PATCH] Try strategy for venv fix (py3)

---
 gitlab/before_build.sh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gitlab/before_build.sh b/gitlab/before_build.sh
index 18a5f77..a350c37 100755
--- a/gitlab/before_build.sh
+++ b/gitlab/before_build.sh
@@ -12,7 +12,6 @@ check_env WHEELS_SERVER
 if [ ! -d ${PREFIX} ]; then
   log_info "Creating virtualenv installation at ${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
@@ -42,22 +41,25 @@ fi
 PIPOPTS="--find-links ${WHEELS_REPOSITORY} --trusted-host ${WHEELS_SERVER}"
 PIPOPTS="${PIPOPTS} --pre --use-wheel --no-index"
 if [ -e requirements.txt ]; then
-  run_cmd ${use_pip} install ${PIPOPTS} --requirement requirements.txt
+  run_cmd_ld ${use_pip} install ${PIPOPTS} --requirement requirements.txt
 else
   log_info "No requirements.txt file found, skipping 'pip install <build-deps>'..."
 fi
 
 # Install this package's test dependencies
 if [ -e test-requirements.txt ]; then
-  run_cmd ${use_pip} install ${PIPOPTS} --requirement test-requirements.txt
+  run_cmd_ld ${use_pip} install ${PIPOPTS} --requirement test-requirements.txt
 else
   log_info "No test-requirements.txt file found, skipping 'pip install <test-deps>'..."
 fi
 
 # Finally, bootstrap the installation from the new environment
 if [ -e bootstrap-buildout.py ]; then
-  run_cmd ${use_python} bootstrap-buildout.py
+  run_cmd_ld ${use_python} bootstrap-buildout.py
 else
   log_error "No bootstrap-buildout.py file found, stopping..."
   exit 1
 fi
+
+# Corrects the virtualenv to take LD_LIBRARY_PATH into account
+fix_venv
-- 
GitLab