Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-python
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-python
Commits
839486c2
Commit
839486c2
authored
Jul 17, 2013
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make things pretty, skip anvil build for normal runs
parent
5d562001
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
41 deletions
+46
-41
compile
bin/compile
+46
-41
No files found.
bin/compile
View file @
839486c2
...
...
@@ -30,13 +30,14 @@ PYTHON_EXE="/app/.heroku/python/bin/python"
PIP_VERSION
=
"1.3.1"
DISTRIBUTE_VERSION
=
"0.6.36"
# Setup bpwatch
export
PATH
=
$PATH
:
$ROOT_DIR
/vendor/bpwatch
LOGPLEX_KEY
=
"t.b396af7f-ad75-4643-8b9e-ebb288acc624"
BUILDPACK_VERSION
=
HEAD
export
BPWATCH_STORE_PATH
=
$CACHE_DIR
/bpwatch.json
# BUILDPACK_VERSION=v23
BUILDPACK_VERSION
=
HEAD
# Support Anvil Build_IDs
[
!
"
$REQUEST_ID
"
]
&&
REQUEST_ID
=
$SLUG_ID
# Sanitizing environment variables.
...
...
@@ -61,13 +62,15 @@ TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
# Copy Anvil app dir to temporary storage...
bpwatch start anvil_appdir_stage
mkdir
-p
$TMP_APP_DIR
deep-mv
$APP_DIR
$TMP_APP_DIR
if
[
"
$SLUG_ID
"
]
;
then
mkdir
-p
$TMP_APP_DIR
deep-mv
$APP_DIR
$TMP_APP_DIR
fi
bpwatch stop anvil_appdir_stage
# Copy Application code in.
bpwatch start appdir_stage
deep-mv
$BUILD_DIR
$APP_DIR
deep-mv
$BUILD_DIR
$APP_DIR
bpwatch stop appdir_stage
# Set new context.
...
...
@@ -86,7 +89,7 @@ cd $BUILD_DIR
# Experimental pre_compile hook.
bpwatch start pre_compile
source
$BIN_DIR
/steps/hooks/pre_compile
source
$BIN_DIR
/steps/hooks/pre_compile
bpwatch stop pre_compile
# If no requirements given, assume `setup.py develop`.
...
...
@@ -106,15 +109,15 @@ mkdir -p $CACHE_DIR
# Purge "old-style" virtualenvs.
bpwatch start clear_old_venvs
[
-d
$CACHE_DIR
/
$LEGACY_TRIGGER
]
&&
rm
-fr
$CACHE_DIR
/.heroku/bin
$CACHE_DIR
/.heroku/lib
$CACHE_DIR
/.heroku/include
[
-d
$CACHE_DIR
/
$VIRTUALENV_LOC
]
&&
rm
-fr
$CACHE_DIR
/.heroku/venv
$CACHE_DIR
/.heroku/src
[
-d
$CACHE_DIR
/
$LEGACY_TRIGGER
]
&&
rm
-fr
$CACHE_DIR
/.heroku/bin
$CACHE_DIR
/.heroku/lib
$CACHE_DIR
/.heroku/include
[
-d
$CACHE_DIR
/
$VIRTUALENV_LOC
]
&&
rm
-fr
$CACHE_DIR
/.heroku/venv
$CACHE_DIR
/.heroku/src
bpwatch stop clear_old_venvs
# Restore old artifacts from the cache.
bpwatch start restore_cache
for
dir
in
$CACHED_DIRS
;
do
for
dir
in
$CACHED_DIRS
;
do
cp
-R
$CACHE_DIR
/
$dir
.
&> /dev/null
||
true
done
done
bpwatch stop restore_cache
set
+e
...
...
@@ -191,7 +194,7 @@ hash -r
# Pylibmc support.
# See [`bin/steps/pylibmc`](pylibmc.html).
bpwatch start pylibmc_install
source
$BIN_DIR
/steps/pylibmc
source
$BIN_DIR
/steps/pylibmc
bpwatch stop pylibmc_install
# Install Mercurial if it appears to be required.
...
...
@@ -215,7 +218,7 @@ puts-step "Installing dependencies using Pip ($PIP_VERSION)"
# Django collectstatic support.
bpwatch start collectstatic
source
$BIN_DIR
/steps/collectstatic
source
$BIN_DIR
/steps/collectstatic
bpwatch stop collectstatic
# ### Finalize
...
...
@@ -234,24 +237,26 @@ set-default-env PYTHONPATH /app/
# Experimental post_compile hook.
bpwatch start post_compile
source
$BIN_DIR
/steps/hooks/post_compile
source
$BIN_DIR
/steps/hooks/post_compile
bpwatch stop post_compile
# Store new artifacts in cache.
bpwatch start dump_cache
for
dir
in
$CACHED_DIRS
;
do
for
dir
in
$CACHED_DIRS
;
do
rm
-rf
$CACHE_DIR
/
$dir
cp
-R
$dir
$CACHE_DIR
/
done
done
bpwatch stop dump_cache
# ### Fin.
bpwatch start appdir_commit
deep-mv
$BUILD_DIR
$ORIG_BUILD_DIR
deep-mv
$BUILD_DIR
$ORIG_BUILD_DIR
bpwatch stop appdir_commit
bpwatch start anvil_appdir_commit
deep-mv
$TMP_APP_DIR
$APP_DIR
if
[
"
$SLUG_ID
"
]
;
then
deep-mv
$TMP_APP_DIR
$APP_DIR
fi
bpwatch stop anvil_appdir_commit
bpwatch stop compile
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment