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
f1ee7fc0
Commit
f1ee7fc0
authored
Apr 26, 2012
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comment updates
parent
e8585fb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
15 deletions
+21
-15
compile
bin/compile
+21
-15
No files found.
bin/compile
View file @
f1ee7fc0
#!/usr/bin/env bash
#!/usr/bin/env bash
# This script serves as the
# This script serves as the
# [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
# [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
# compiler.
# compiler.
#
#
# A [buildpack](http://devcenter.heroku.com/articles/buildpacks) is an
# A [buildpack](http://devcenter.heroku.com/articles/buildpacks) is an
# adapter between a Python application and Heroku's runtime.
# adapter between a Python application and Heroku's runtime.
#
# You can intreract with the Heroku API directly with [heroku.py](https://github.com/heroku/heroku.py/).
#
# See also: [Release history](/changelog.html), [Detection](/detect.html).
#
# ## Usage
# ## Usage
# Compiling an app into a slug is simple:
# Compiling an app into a slug is simple:
#
#
# $ bin/compile <build-dir> <cache-dir>
# $ bin/compile <build-dir> <cache-dir>
# ## Assumptions
# ## Assumptions
#
#
# This buildpack makes the following assumptions:
# This buildpack makes the following assumptions:
#
#
# - The desired Python VM is available on the base system.
# - The desired Python VM is available on the base system.
# - Library dependencies are available on the base system.
# - Library dependencies are available on the base system.
# - Django applications should not require any platform-specific configuration.
# - Django applications should not require any platform-specific configuration.
...
@@ -81,13 +85,13 @@ function puts-warn (){
...
@@ -81,13 +85,13 @@ function puts-warn (){
}
}
# ## Build Time
# ## Build Time
#
#
# Switch to the repo's context.
# Switch to the repo's context.
cd
$BUILD_DIR
cd
$BUILD_DIR
# ### Sanity Checks
# ### Sanity Checks
#
#
# Just a little peace of mind.
# Just a little peace of mind.
# If no requirements given, assume `setup.py develop`.
# If no requirements given, assume `setup.py develop`.
...
@@ -134,7 +138,7 @@ done
...
@@ -134,7 +138,7 @@ done
#
#
# Create the virtualenv. Rebuild if corrupt.
# Create the virtualenv. Rebuild if corrupt.
# TODO: Bootstrap a bottled Python VM...
# TODO: Bootstrap a bottled Python VM...
set
+e
set
+e
puts-step
"Preparing Python interpreter (
$PYTHON_VERSION
)"
puts-step
"Preparing Python interpreter (
$PYTHON_VERSION
)"
...
@@ -155,7 +159,7 @@ echo "$OUT" | indent
...
@@ -155,7 +159,7 @@ echo "$OUT" | indent
set
-e
set
-e
# Pylibmc support.
# Pylibmc support.
# See [`bin/steps/pylibmc`](pylibmc.html).
# See [`bin/steps/pylibmc`](pylibmc.html).
source
$BIN_DIR
/steps/pylibmc
source
$BIN_DIR
/steps/pylibmc
...
@@ -174,7 +178,7 @@ pip install --use-mirrors -r requirements.txt --src ./.heroku/src | indent
...
@@ -174,7 +178,7 @@ pip install --use-mirrors -r requirements.txt --src ./.heroku/src | indent
# Do additional application hackery if applications appears to be a Django app.
# Do additional application hackery if applications appears to be a Django app.
# Optionally, disable all Django-specific changes with `DISABLE_INJECTION` env.
# Optionally, disable all Django-specific changes with `DISABLE_INJECTION` env.
#
#
# See [`bin/steps/django`](django.html).
# See [`bin/steps/django`](django.html).
if
[
"
$NAME
"
=
"Python/Django"
]
&&
!
[
"
$DISABLE_INJECTION
"
]
;
then
if
[
"
$NAME
"
=
"Python/Django"
]
&&
!
[
"
$DISABLE_INJECTION
"
]
;
then
...
@@ -201,4 +205,6 @@ for dir in $CACHED_DIRS; do
...
@@ -201,4 +205,6 @@ for dir in $CACHED_DIRS; do
cp
-R
$dir
$CACHE_DIR
/
cp
-R
$dir
$CACHE_DIR
/
done
done
# ### Fin.
# ### Fin.
\ No newline at end of file
# <a href="http://github.com/heroku/heroku-buildpack-python"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
\ No newline at end of file
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