From 26dd3828dfa1a0ad075e359c6fc359c898d3eb08 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 26 Feb 2012 15:46:57 -0500 Subject: [PATCH] Start Decoupled Pythons --- bin/compile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index d80c77b..8e14699 100755 --- a/bin/compile +++ b/bin/compile @@ -15,6 +15,7 @@ NAME=$($BIN_DIR/detect $BUILD_DIR) PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-$CACHE_DIR/pip_downloads} VIRTUALENV_DIRS="bin include lib" VENDORED_MEMCACHED="http://cl.ly/0a191R3K160t1w1P0N25/vendor-libmemcached.tar.gz" +PYTHON_VERSION="2.7" unset GIT_DIR export PIP_DOWNLOAD_CACHE @@ -54,10 +55,14 @@ done # Create virtualenv. Rebuild if corrupt. set +e + +echo "-----> Preparing Python ($PYTHON_VERSION)" +PYTHON_EXE=$(python-build install $PYTHON_VERSION --quiet) + echo "-----> Preparing virtualenv version $(virtualenv --version)" # Try to create the virtualenv. -OUT=$(virtualenv --distribute --never-download --prompt=venv . 2>&1) +OUT=$(virtualenv --python $PYTHON_EXE --distribute --never-download --prompt=venv . 2>&1) # If there's an error, purge and recreate. [ $? -ne 0 ] && { @@ -65,7 +70,7 @@ OUT=$(virtualenv --distribute --never-download --prompt=venv . 2>&1) for dir in $VIRTUALENV_DIRS; do rm -fr $dir &> /dev/null || true done - OUT=$(virtualenv --distribute --never-download --prompt=venv . ) + OUT=$(virtualenv --python $PYTHON_EXE --distribute --never-download --prompt=venv . ) } echo "$OUT" | indent