mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b7edad8a2 | |||
| 02787ac910 | |||
| 31e65dc58b | |||
| 9a227e6c73 | |||
| ddc9c24d34 | |||
| 42488a2be7 | |||
| 839486c25b | |||
| 5d56200179 |
+11
-7
@@ -30,16 +30,17 @@ PYTHON_EXE="/app/.heroku/python/bin/python"
|
|||||||
PIP_VERSION="1.3.1"
|
PIP_VERSION="1.3.1"
|
||||||
DISTRIBUTE_VERSION="0.6.36"
|
DISTRIBUTE_VERSION="0.6.36"
|
||||||
|
|
||||||
|
# Setup bpwatch
|
||||||
export PATH=$PATH:$ROOT_DIR/vendor/bpwatch
|
export PATH=$PATH:$ROOT_DIR/vendor/bpwatch
|
||||||
|
|
||||||
LOGPLEX_KEY="t.b396af7f-ad75-4643-8b9e-ebb288acc624"
|
LOGPLEX_KEY="t.b396af7f-ad75-4643-8b9e-ebb288acc624"
|
||||||
BUILDPACK_VERSION=HEAD
|
|
||||||
|
|
||||||
export BPWATCH_STORE_PATH=$CACHE_DIR/bpwatch.json
|
export BPWATCH_STORE_PATH=$CACHE_DIR/bpwatch.json
|
||||||
|
BUILDPACK_VERSION=v25
|
||||||
|
|
||||||
|
# Support Anvil Build_IDs
|
||||||
[ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID
|
[ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID
|
||||||
|
|
||||||
|
# Sanitizing environment variables.
|
||||||
|
unset GIT_DIR PYTHONHOME PYTHONPATH LD_LIBRARY_PATH LIBRARY_PATH
|
||||||
|
|
||||||
bpwatch init $LOGPLEX_KEY
|
bpwatch init $LOGPLEX_KEY
|
||||||
bpwatch build python $BUILDPACK_VERSION $REQUEST_ID
|
bpwatch build python $BUILDPACK_VERSION $REQUEST_ID
|
||||||
@@ -48,9 +49,6 @@ TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
|
|||||||
bpwatch start compile
|
bpwatch start compile
|
||||||
|
|
||||||
|
|
||||||
# Sanitizing environment variables.
|
|
||||||
unset GIT_DIR PYTHONHOME PYTHONPATH LD_LIBRARY_PATH LIBRARY_PATH
|
|
||||||
|
|
||||||
# We'll need to send these statics to other scripts we `source`.
|
# We'll need to send these statics to other scripts we `source`.
|
||||||
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
|
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
|
||||||
|
|
||||||
@@ -63,8 +61,12 @@ TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
|
|||||||
|
|
||||||
# Copy Anvil app dir to temporary storage...
|
# Copy Anvil app dir to temporary storage...
|
||||||
bpwatch start anvil_appdir_stage
|
bpwatch start anvil_appdir_stage
|
||||||
|
if [ "$SLUG_ID" ]; then
|
||||||
mkdir -p $TMP_APP_DIR
|
mkdir -p $TMP_APP_DIR
|
||||||
deep-mv $APP_DIR $TMP_APP_DIR
|
deep-mv $APP_DIR $TMP_APP_DIR
|
||||||
|
else
|
||||||
|
deep-rm $APP_DIR
|
||||||
|
fi
|
||||||
bpwatch stop anvil_appdir_stage
|
bpwatch stop anvil_appdir_stage
|
||||||
|
|
||||||
# Copy Application code in.
|
# Copy Application code in.
|
||||||
@@ -253,7 +255,9 @@ deep-mv $BUILD_DIR $ORIG_BUILD_DIR
|
|||||||
bpwatch stop appdir_commit
|
bpwatch stop appdir_commit
|
||||||
|
|
||||||
bpwatch start anvil_appdir_commit
|
bpwatch start anvil_appdir_commit
|
||||||
|
if [ "$SLUG_ID" ]; then
|
||||||
deep-mv $TMP_APP_DIR $APP_DIR
|
deep-mv $TMP_APP_DIR $APP_DIR
|
||||||
|
fi
|
||||||
bpwatch stop anvil_appdir_commit
|
bpwatch stop anvil_appdir_commit
|
||||||
|
|
||||||
bpwatch stop compile
|
bpwatch stop compile
|
||||||
|
|||||||
@@ -52,3 +52,11 @@ function deep-mv (){
|
|||||||
rm -fr $1/!(tmp)
|
rm -fr $1/!(tmp)
|
||||||
find -H $1 -maxdepth 1 -name '.*' -a \( -type d -o -type f -o -type l \) -exec rm -fr '{}' \;
|
find -H $1 -maxdepth 1 -name '.*' -a \( -type d -o -type f -o -type l \) -exec rm -fr '{}' \;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Does some serious deleting.
|
||||||
|
function deep-rm (){
|
||||||
|
rm -fr $1/!(tmp)
|
||||||
|
find -H $1 -maxdepth 1 -name '.*' -a \( -type d -o -type f -o -type l \) -exec rm -fr '{}' \;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
Reference in New Issue
Block a user