Commit 2b62692a authored by Kenneth Reitz's avatar Kenneth Reitz

Merge branch 'preserve-ORIG_BUILD_DIR' of...

Merge branch 'preserve-ORIG_BUILD_DIR' of https://github.com/tommyvn/heroku-buildpack-python into multi
parents 9188d947 a91e9c2f
...@@ -25,8 +25,6 @@ CACHED_DIRS=".heroku" ...@@ -25,8 +25,6 @@ CACHED_DIRS=".heroku"
# Static configurations for virtualenv caches. # Static configurations for virtualenv caches.
VIRTUALENV_LOC=".heroku/venv" VIRTUALENV_LOC=".heroku/venv"
LEGACY_TRIGGER="lib/python2.7" LEGACY_TRIGGER="lib/python2.7"
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
WEBCONCURRENCY_PROFILE_PATH="$BUILD_DIR/.profile.d/python.webconcurrency.sh"
DEFAULT_PYTHON_VERSION="python-2.7.10" DEFAULT_PYTHON_VERSION="python-2.7.10"
DEFAULT_PYTHON_STACK="cedar" DEFAULT_PYTHON_STACK="cedar"
...@@ -57,10 +55,6 @@ TMP_APP_DIR=$CACHE_DIR/tmp_app_dir ...@@ -57,10 +55,6 @@ TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
bpwatch start compile bpwatch start compile
# We'll need to send these statics to other scripts we `source`.
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
# Syntax sugar. # Syntax sugar.
source $BIN_DIR/utils source $BIN_DIR/utils
...@@ -83,7 +77,7 @@ if [[ ! "$DOCKER_BUILD" ]]; then ...@@ -83,7 +77,7 @@ if [[ ! "$DOCKER_BUILD" ]]; then
# Copy Application code in. # Copy Application code in.
bpwatch start appdir_stage bpwatch start appdir_stage
deep-mv $BUILD_DIR $APP_DIR deep-cp $BUILD_DIR $APP_DIR
bpwatch stop appdir_stage bpwatch stop appdir_stage
fi fi
...@@ -92,6 +86,13 @@ fi ...@@ -92,6 +86,13 @@ fi
ORIG_BUILD_DIR=$BUILD_DIR ORIG_BUILD_DIR=$BUILD_DIR
BUILD_DIR=$APP_DIR BUILD_DIR=$APP_DIR
# Set up outputs under new context
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
WEBCONCURRENCY_PROFILE_PATH="$BUILD_DIR/.profile.d/python.webconcurrency.sh"
# We'll need to send these statics to other scripts we `source`.
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
# Prepend proper path buildpack use. # Prepend proper path buildpack use.
export PATH=$BUILD_DIR/.heroku/python/bin:$BUILD_DIR/.heroku/vendor/bin:$PATH export PATH=$BUILD_DIR/.heroku/python/bin:$BUILD_DIR/.heroku/vendor/bin:$PATH
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
...@@ -218,6 +219,7 @@ bpwatch stop dump_cache ...@@ -218,6 +219,7 @@ bpwatch stop dump_cache
if [[ ! "$DOCKER_BUILD" ]]; then if [[ ! "$DOCKER_BUILD" ]]; then
bpwatch start appdir_commit bpwatch start appdir_commit
deep-rm $ORIG_BUILD_DIR
deep-mv $BUILD_DIR $ORIG_BUILD_DIR deep-mv $BUILD_DIR $ORIG_BUILD_DIR
bpwatch stop appdir_commit bpwatch stop appdir_commit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment