1
1
#! /usr/bin/env bash
2
2
3
- # This script serves as the
4
- # [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
5
- # compiler.
6
- #
7
- # A [buildpack](http://devcenter.heroku.com/articles/buildpacks) is an
3
+ # This script serves as the
4
+ # [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
5
+ # compiler.
6
+ #
7
+ # A [buildpack](http://devcenter.heroku.com/articles/buildpacks) is an
8
8
# adapter between a Python application and Heroku's runtime.
9
-
9
+ #
10
+ # You can intreract with the Heroku API directly with [heroku.py](https://github.com/heroku/heroku.py/).
11
+ #
12
+ # See also: [Release history](/changelog.html), [Detection](/detect.html).
13
+ #
10
14
# ## Usage
11
15
# Compiling an app into a slug is simple:
12
- #
16
+ #
13
17
# $ bin/compile <build-dir> <cache-dir>
14
18
15
19
16
20
# ## Assumptions
17
- #
21
+ #
18
22
# This buildpack makes the following assumptions:
19
- #
23
+ #
20
24
# - The desired Python VM is available on the base system.
21
25
# - Library dependencies are available on the base system.
22
26
# - Django applications should not require any platform-specific configuration.
@@ -81,13 +85,13 @@ function puts-warn (){
81
85
}
82
86
83
87
# ## Build Time
84
- #
88
+ #
85
89
86
90
# Switch to the repo's context.
87
91
cd $BUILD_DIR
88
92
89
93
# ### Sanity Checks
90
- #
94
+ #
91
95
# Just a little peace of mind.
92
96
93
97
# If no requirements given, assume `setup.py develop`.
134
138
#
135
139
136
140
# Create the virtualenv. Rebuild if corrupt.
137
- # TODO: Bootstrap a bottled Python VM...
141
+ # TODO: Bootstrap a bottled Python VM...
138
142
139
143
set +e
140
144
puts-step " Preparing Python interpreter ($PYTHON_VERSION )"
@@ -155,7 +159,7 @@ echo "$OUT" | indent
155
159
156
160
set -e
157
161
158
- # Pylibmc support.
162
+ # Pylibmc support.
159
163
# See [`bin/steps/pylibmc`](pylibmc.html).
160
164
source $BIN_DIR /steps/pylibmc
161
165
@@ -174,7 +178,7 @@ pip install --use-mirrors -r requirements.txt --src ./.heroku/src | indent
174
178
175
179
# Do additional application hackery if applications appears to be a Django app.
176
180
# Optionally, disable all Django-specific changes with `DISABLE_INJECTION` env.
177
- #
181
+ #
178
182
# See [`bin/steps/django`](django.html).
179
183
180
184
if [ " $NAME " = " Python/Django" ] && ! [ " $DISABLE_INJECTION " ]; then
@@ -201,4 +205,6 @@ for dir in $CACHED_DIRS; do
201
205
cp -R $dir $CACHE_DIR /
202
206
done
203
207
204
- # ### Fin.
208
+ # ### Fin.
209
+
210
+ # <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>
0 commit comments