mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
240 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 43c7079a07 | |||
| 097f64721a | |||
| b3b6c78657 | |||
| fcfc2f8651 | |||
| 1f9b0bfe02 | |||
| 533def6b57 | |||
| 826193ef5a | |||
| 631aa4b356 | |||
| 067422b4b4 | |||
| 7ec8f12648 | |||
| 731a0cb0bf | |||
| ebd97e9b93 | |||
| 9fcf81c170 | |||
| 1f2cb16dbb | |||
| 827306728f | |||
| f6076cb7f0 | |||
| 694386e233 | |||
| f11928af11 | |||
| acda8f640a | |||
| 4ff3a5d818 | |||
| 314b729c8a | |||
| 9fb676aba9 | |||
| b91741d10d | |||
| f3787356b6 | |||
| def3136c85 | |||
| abb0c9b384 | |||
| 87b2891c1a | |||
| 52c34ef64f | |||
| 40bc836a55 | |||
| d2738ece19 | |||
| f758a5d738 | |||
| 63edc5d89b | |||
| 0db1584f21 | |||
| 1ed173f21d | |||
| b17f3f51f7 | |||
| 4f0556cce7 | |||
| b55a5e5ec8 | |||
| 68acbb064d | |||
| 92df76793f | |||
| 5cda51c7a5 | |||
| 659a406eb8 | |||
| 4cf2dd5b32 | |||
| 100a5ba0bc | |||
| ab16abaa88 | |||
| 989dd1dd2a | |||
| 0468ef22c4 | |||
| 6238994a17 | |||
| 7ba2fe66a0 | |||
| dfaec438d9 | |||
| aaeef59ff6 | |||
| 4d35f5129a | |||
| 84f610347c | |||
| 44bfda1320 | |||
| 330524adba | |||
| 85bddf8f00 | |||
| 7b0d891f4d | |||
| 84f0e2feba | |||
| 76309c35ec | |||
| 3f6b453c0a | |||
| 43dbb49103 | |||
| f08f93f347 | |||
| e0c852f4b9 | |||
| 15373996f4 | |||
| ff1e8da0cb | |||
| 99f7f5b9f1 | |||
| 656f390de8 | |||
| 42a7e79359 | |||
| bf084cc2ac | |||
| eaaba665bc | |||
| 94d311134c | |||
| 0d49ae9851 | |||
| a5c39384a8 | |||
| cb6bc30bc6 | |||
| 82c72a94d9 | |||
| f327afd364 | |||
| d94f4c5bbc | |||
| 8be04ea656 | |||
| de7c16d942 | |||
| 5ea843458a | |||
| 758941d12f | |||
| e01d5bc18b | |||
| 2c16539190 | |||
| ed79e61a2f | |||
| b7bcc69722 | |||
| 3dde375d0b | |||
| 483e30a5ba | |||
| e783556e6b | |||
| 5645a433dc | |||
| 715ab8b96a | |||
| 5f96190eb5 | |||
| c579162ef9 | |||
| a5cca6de75 | |||
| b7f1157693 | |||
| ae7b6fc715 | |||
| e0c3b72950 | |||
| 566f7f4555 | |||
| 4ff62b2b41 | |||
| d47970fd81 | |||
| 69bdca063f | |||
| 63cea99415 | |||
| 5ecd27e3b8 | |||
| 206a2dbc04 | |||
| 2a083791b6 | |||
| d5b2b0b464 | |||
| 2eab1ad845 | |||
| 2b16420d41 | |||
| 9fa0889499 | |||
| 99b17fabeb | |||
| 933d3014d7 | |||
| 018e0f31de | |||
| cf1647e937 | |||
| b9f154bf38 | |||
| 4cc18ce0af | |||
| f5ea1c24a3 | |||
| 952b0bb735 | |||
| 8b7edad8a2 | |||
| 02787ac910 | |||
| bcc3ba09ca | |||
| 31e65dc58b | |||
| 9a227e6c73 | |||
| ddc9c24d34 | |||
| 42488a2be7 | |||
| 839486c25b | |||
| 5d56200179 | |||
| fef1d4f7c0 | |||
| 43defcc17e | |||
| f78460e2a7 | |||
| 3448923b69 | |||
| 58a13bc268 | |||
| c18038f986 | |||
| d4356a1f4c | |||
| 3c8f478b65 | |||
| 23493302e6 | |||
| 35ceaf728d | |||
| 5c9412fc33 | |||
| 825c9329eb | |||
| 9ebb990716 | |||
| f964209589 | |||
| 2e699d392e | |||
| 431ecee509 | |||
| 90696215ae | |||
| 5b55261700 | |||
| 727ff90acf | |||
| 0060fdacd8 | |||
| 85ad1fa988 | |||
| 56c022ca41 | |||
| f68e0989ea | |||
| 7381117bb8 | |||
| c9209ebb3d | |||
| 35345d11f5 | |||
| 6ee17b4c26 | |||
| 86267f93a1 | |||
| 50642e7069 | |||
| 8349f291d2 | |||
| 1aad21382e | |||
| 686ee087a5 | |||
| f137ba213a | |||
| 5ae51010cc | |||
| 29d8e7f670 | |||
| 5be3e0ce52 | |||
| ddde30a12e | |||
| 2db5578998 | |||
| 290250836f | |||
| 0ff4df4dc3 | |||
| 9177aa2c08 | |||
| ad791dc7f8 | |||
| 6b298ff7f3 | |||
| 01e30e938c | |||
| e81632e05e | |||
| 4ab3358851 | |||
| 4ded988907 | |||
| 8637dc05c0 | |||
| 6f65ad0b97 | |||
| c5ec378ea7 | |||
| 37013c2eca | |||
| 54a8a6407e | |||
| 69360fb804 | |||
| 92d296ec24 | |||
| 99557332a0 | |||
| a3d9c5a1b2 | |||
| 235ff64a38 | |||
| 0f7fca9e03 | |||
| 161bf49a3a | |||
| 7ac90f19dd | |||
| 90cc426c82 | |||
| 550a239553 | |||
| 57fea1bd6f | |||
| d758545164 | |||
| 5935632b8b | |||
| 8f3a7b7947 | |||
| 2f47bd12fd | |||
| 86fb607dd4 | |||
| 80823b1e16 | |||
| ff6f56b8c5 | |||
| 5393ba3cb4 | |||
| 4ade6c0457 | |||
| e5c389e677 | |||
| ea27b5a77c | |||
| 18c19e4466 | |||
| 0ea950ee52 | |||
| 2d3033fc71 | |||
| 1687f1cffe | |||
| 2f0263a5b8 | |||
| dfbf20acd2 | |||
| 0b9019ab71 | |||
| b0fc2245f4 | |||
| 113c669041 | |||
| b8b5e12a4a | |||
| bece3de495 | |||
| 89120f7797 | |||
| 99e035495b | |||
| 0c56b0c35c | |||
| 111f92e368 | |||
| 03e666ffea | |||
| 40598be9d4 | |||
| 8f057f3c9b | |||
| 972e6f8054 | |||
| aeb7ef392a | |||
| 930a63d55c | |||
| 544de727a0 | |||
| 466e6b5fe3 | |||
| 1abaaf6cf1 | |||
| 48bd910207 | |||
| 87c580f819 | |||
| db1df1ac67 | |||
| 4005d7ea50 | |||
| d29d4404c3 | |||
| 33779576bd | |||
| 3bddd66637 | |||
| e00a407c91 | |||
| 117dcff4e1 | |||
| 7243afd5b5 | |||
| 0a75bc9744 | |||
| ca3b3808b9 | |||
| 287b398826 | |||
| 76d2eda80e | |||
| 880c498c3f | |||
| 12f053ef7f | |||
| 35ee2f60bd | |||
| 3e480e9aea |
@@ -1,6 +1,6 @@
|
|||||||
MIT License:
|
MIT License:
|
||||||
|
|
||||||
Copyright (C) 2012 Heroku, Inc.
|
Copyright (C) 2013 Heroku, Inc.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,5 @@
|
|||||||
|
# These targets are not files
|
||||||
|
.PHONY: tests
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
./bin/test
|
./bin/test
|
||||||
|
|
||||||
docs:
|
|
||||||
mkdir -p site
|
|
||||||
shocco -t 'Python Buildpack Compiler' ./bin/compile > site/index.html
|
|
||||||
shocco -t 'Django Buildpack Compiler' ./bin/steps/django > site/django.html
|
|
||||||
shocco -t 'Python Buildpack Detector' ./bin/detect > site/detect.html
|
|
||||||
shocco -t 'Pylibmc Buildpack Compiler' ./bin/steps/pylibmc > site/pylibmc.html
|
|
||||||
shocco -t 'Python Buildpack Changelog' ./Changelog.md > site/changelog.html
|
|
||||||
|
|
||||||
site: docs
|
|
||||||
cd site && git add -A && git commit -m 'update' && git push heroku master
|
|
||||||
|
|
||||||
pip:
|
|
||||||
git clone git@github.com:kennethreitz/pip.git --branch heroku --depth 1
|
|
||||||
rm -fr vendor/virtualenv-1.8.4/virtualenv_support/pip-1.2.1.tar.gz
|
|
||||||
rm -fr pip/.git
|
|
||||||
tar -pczf vendor/virtualenv-1.8.4/virtualenv_support/pip-1.2.1.tar.gz pip
|
|
||||||
rm -fr pip
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
Heroku buildpack: Python
|
Heroku buildpack: Python
|
||||||
========================
|
========================
|
||||||
|
|
||||||
This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for Python apps.
|
This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for Python apps, powered by [pip](http://www.pip-installer.org/).
|
||||||
It uses [virtualenv](http://www.virtualenv.org/) and [pip](http://www.pip-installer.org/).
|
|
||||||
|
|
||||||
[](http://travis-ci.org/heroku/heroku-buildpack-python)
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
@@ -14,36 +12,43 @@ Example usage:
|
|||||||
$ ls
|
$ ls
|
||||||
Procfile requirements.txt web.py
|
Procfile requirements.txt web.py
|
||||||
|
|
||||||
$ heroku create --stack cedar --buildpack git://github.com/heroku/heroku-buildpack-python.git
|
$ heroku create --buildpack git://github.com/heroku/heroku-buildpack-python.git
|
||||||
|
|
||||||
$ git push heroku master
|
$ git push heroku master
|
||||||
...
|
...
|
||||||
-----> Heroku receiving push
|
|
||||||
-----> Fetching custom build pack... done
|
|
||||||
-----> Python app detected
|
-----> Python app detected
|
||||||
-----> Preparing virtualenv version 1.6.4
|
-----> No runtime.txt provided; assuming python-2.7.8.
|
||||||
New python executable in ./bin/python
|
-----> Preparing Python runtime (python-2.7.8)
|
||||||
Installing setuptools............done.
|
-----> Installing Setuptools (3.6)
|
||||||
Installing pip...............done.
|
-----> Installing Pip (1.5.6)
|
||||||
-----> Installing dependencies using pip version 1.0.2
|
-----> Installing dependencies using Pip (1.5.6)
|
||||||
Downloading/unpacking Flask==0.7.2 (from -r requirements.txt (line 1))
|
Downloading/unpacking requests (from -r requirements.txt (line 1))
|
||||||
Downloading/unpacking Werkzeug>=0.6.1 (from Flask==0.7.2->-r requirements.txt (line 1))
|
Installing collected packages: requests
|
||||||
Downloading/unpacking Jinja2>=2.4 (from Flask==0.7.2->-r requirements.txt (line 1))
|
Successfully installed requests
|
||||||
Installing collected packages: Flask, Werkzeug, Jinja2
|
|
||||||
Successfully installed Flask Werkzeug Jinja2
|
|
||||||
Cleaning up...
|
Cleaning up...
|
||||||
|
-----> Discovering process types
|
||||||
|
Procfile declares types -> (none)
|
||||||
|
|
||||||
You can also add it to upcoming builds of an existing application:
|
You can also add it to upcoming builds of an existing application:
|
||||||
|
|
||||||
$ heroku config:add BUILDPACK_URL=git://github.com/heroku/heroku-buildpack-python.git
|
$ heroku config:add BUILDPACK_URL=git://github.com/heroku/heroku-buildpack-python.git
|
||||||
|
|
||||||
The buildpack will detect your app as Python if it has the file `requirements.txt` in the root. It will detect your app as Python/Django if there is an additional `settings.py` in a project subdirectory.
|
The buildpack will detect your app as Python if it has the file `requirements.txt` in the root.
|
||||||
|
|
||||||
It will use virtualenv and pip to install your dependencies, vendoring a copy of the Python runtime into your slug. The `bin/`, `include/` and `lib/` directories will be cached between builds to allow for faster pip install time.
|
It will use Pip to install your dependencies, vendoring a copy of the Python runtime into your slug.
|
||||||
|
|
||||||
Hacking
|
Specify a Runtime
|
||||||
-------
|
-----------------
|
||||||
|
|
||||||
To use this buildpack, fork it on Github. Push up changes to your fork, then create a test app with `--buildpack <your-github-url>` and push to it.
|
You can also provide arbitrary releases Python with a `runtime.txt` file.
|
||||||
|
|
||||||
To change the vendored virtualenv, unpack the desired version to the `src/` folder, and update the virtualenv() function in `bin/compile` to prepend the virtualenv module directory to the path. The virtualenv release vendors its own versions of pip and setuptools.
|
$ cat runtime.txt
|
||||||
|
python-3.4.1
|
||||||
|
|
||||||
|
Runtime options include:
|
||||||
|
|
||||||
|
- python-2.7.8
|
||||||
|
- python-3.4.1
|
||||||
|
- pypy-1.9 (experimental)
|
||||||
|
|
||||||
|
Other [unsupported runtimes](https://github.com/heroku/heroku-buildpack-python/tree/master/builds/runtimes) are available as well.
|
||||||
|
|||||||
+202
-147
@@ -1,33 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# This script serves as the
|
# Usage:
|
||||||
# [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
|
|
||||||
# compiler.
|
|
||||||
#
|
#
|
||||||
# A [buildpack](http://devcenter.heroku.com/articles/buildpacks) is an
|
# $ bin/compile <build-dir> <cache-dir> <env-path>
|
||||||
# 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
|
|
||||||
# Compiling an app into a slug is simple:
|
|
||||||
#
|
|
||||||
# $ bin/compile <build-dir> <cache-dir>
|
|
||||||
|
|
||||||
|
|
||||||
# ## Assumptions
|
|
||||||
#
|
|
||||||
# This buildpack makes the following assumptions:
|
|
||||||
#
|
|
||||||
# - The desired Python VM is available on the base system.
|
|
||||||
# - Library dependencies are available on the base system.
|
|
||||||
# - Django applications should not require any platform-specific configuration.
|
|
||||||
|
|
||||||
# <hr />
|
|
||||||
|
|
||||||
# ## Context
|
|
||||||
|
|
||||||
# Fail fast and fail hard.
|
# Fail fast and fail hard.
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
@@ -40,46 +15,87 @@ BIN_DIR=$(cd $(dirname $0); pwd) # absolute path
|
|||||||
ROOT_DIR=$(dirname $BIN_DIR)
|
ROOT_DIR=$(dirname $BIN_DIR)
|
||||||
BUILD_DIR=$1
|
BUILD_DIR=$1
|
||||||
CACHE_DIR=$2
|
CACHE_DIR=$2
|
||||||
|
ENV_DIR=$3
|
||||||
|
|
||||||
# The detected application type (`Python`|`Python/Django`).
|
|
||||||
NAME=$($BIN_DIR/detect $BUILD_DIR)
|
|
||||||
|
|
||||||
# Where to store the Pip download cache.
|
|
||||||
CACHED_DIRS=".heroku"
|
CACHED_DIRS=".heroku"
|
||||||
PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-$CACHE_DIR/pip_downloads}
|
|
||||||
|
|
||||||
# Static configurations for virtualenv caches.
|
# Static configurations for virtualenv caches.
|
||||||
LEGACY_VIRTUALENV_LOC="."
|
VIRTUALENV_LOC=".heroku/venv"
|
||||||
MODERN_VIRTUALENV_LOC=".heroku/venv"
|
LEGACY_TRIGGER="lib/python2.7"
|
||||||
LEGACY_VIRTUALENV_DIRS="bin include lib"
|
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
|
||||||
LEGACY_VIRTUALENV_TRIGGER="lib/python2.7"
|
|
||||||
PROFILE_PATH="$1/.profile.d/python.sh"
|
|
||||||
|
|
||||||
|
DEFAULT_PYTHON_VERSION="python-2.7.8"
|
||||||
|
PYTHON_EXE="/app/.heroku/python/bin/python"
|
||||||
|
PIP_VERSION="1.5.6"
|
||||||
|
SETUPTOOLS_VERSION="3.6"
|
||||||
|
|
||||||
# Python version. This will be used in the future to specify custom Pythons.
|
# Setup bpwatch
|
||||||
PYTHON_VERSION="2.7.2"
|
export PATH=$PATH:$ROOT_DIR/vendor/bpwatch
|
||||||
PYTHON_EXE="python2.7"
|
LOGPLEX_KEY="t.b90d9d29-5388-4908-9737-b4576af1d4ce"
|
||||||
|
export BPWATCH_STORE_PATH=$CACHE_DIR/bpwatch.json
|
||||||
|
BUILDPACK_VERSION=v28
|
||||||
|
|
||||||
|
# Support Anvil Build_IDs
|
||||||
|
[ ! "$SLUG_ID" ] && SLUG_ID="defaultslug"
|
||||||
|
[ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID
|
||||||
|
|
||||||
# Sanitizing environment variables.
|
# Sanitizing environment variables.
|
||||||
unset GIT_DIR PYTHONHOME PYTHONPATH LD_LIBRARY_PATH LIBRARY_PATH
|
unset GIT_DIR PYTHONHOME PYTHONPATH LD_LIBRARY_PATH LIBRARY_PATH
|
||||||
|
|
||||||
# We'll need to send these statics to other scripts we `source`.
|
bpwatch init $LOGPLEX_KEY
|
||||||
export PIP_DOWNLOAD_CACHE BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
|
bpwatch build python $BUILDPACK_VERSION $REQUEST_ID
|
||||||
|
TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
|
||||||
|
|
||||||
|
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.
|
||||||
source $BIN_DIR/utils
|
source $BIN_DIR/utils
|
||||||
|
|
||||||
# ## Build Time
|
# Directory Hacks for path consistiency.
|
||||||
#
|
APP_DIR='/app'
|
||||||
|
TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
|
||||||
|
|
||||||
|
# Copy Anvil app dir to temporary storage...
|
||||||
|
bpwatch start anvil_appdir_stage
|
||||||
|
if [ "$SLUG_ID" ]; then
|
||||||
|
mkdir -p $TMP_APP_DIR
|
||||||
|
deep-mv $APP_DIR $TMP_APP_DIR
|
||||||
|
else
|
||||||
|
deep-rm $APP_DIR
|
||||||
|
fi
|
||||||
|
bpwatch stop anvil_appdir_stage
|
||||||
|
|
||||||
|
# Copy Application code in.
|
||||||
|
bpwatch start appdir_stage
|
||||||
|
deep-mv $BUILD_DIR $APP_DIR
|
||||||
|
bpwatch stop appdir_stage
|
||||||
|
|
||||||
|
# Set new context.
|
||||||
|
ORIG_BUILD_DIR=$BUILD_DIR
|
||||||
|
BUILD_DIR=$APP_DIR
|
||||||
|
|
||||||
|
# Prepend proper path buildpack use.
|
||||||
|
export PATH=$BUILD_DIR/.heroku/python/bin:$BUILD_DIR/.heroku/vendor/bin:$PATH
|
||||||
|
export PYTHONUNBUFFERED=1
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
export C_INCLUDE_PATH=/app/.heroku/vendor/include:$BUILD_DIR/.heroku/vendor/include:/app/.heroku/python/include
|
||||||
|
export CPLUS_INCLUDE_PATH=/app/.heroku/vendor/include:$BUILD_DIR/.heroku/vendor/include:/app/.heroku/python/include
|
||||||
|
export LIBRARY_PATH=/app/.heroku/vendor/lib:$BUILD_DIR/.heroku/vendor/lib:/app/.heroku/python/lib
|
||||||
|
export LD_LIBRARY_PATH=/app/.heroku/vendor/lib:$BUILD_DIR/.heroku/vendor/lib:/app/.heroku/python/lib
|
||||||
|
export PKG_CONFIG_PATH=/app/.heroku/vendor/lib/pkg-config:$BUILD_DIR/.heroku/vendor/lib/pkg-config:/app/.heroku/python/lib/pkg-config
|
||||||
|
|
||||||
# Switch to the repo's context.
|
# Switch to the repo's context.
|
||||||
cd $BUILD_DIR
|
cd $BUILD_DIR
|
||||||
|
|
||||||
# Experimental pre_compile hook.
|
# Experimental pre_compile hook.
|
||||||
source $BIN_DIR/steps/hooks/pre_compile
|
bpwatch start pre_compile
|
||||||
|
source $BIN_DIR/steps/hooks/pre_compile
|
||||||
# ### Sanity Checks
|
bpwatch stop pre_compile
|
||||||
#
|
|
||||||
# Just a little peace of mind.
|
|
||||||
|
|
||||||
# If no requirements given, assume `setup.py develop`.
|
# If no requirements given, assume `setup.py develop`.
|
||||||
if [ ! -f requirements.txt ]; then
|
if [ ! -f requirements.txt ]; then
|
||||||
@@ -87,139 +103,178 @@ if [ ! -f requirements.txt ]; then
|
|||||||
echo "-e ." > requirements.txt
|
echo "-e ." > requirements.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ### The Cache
|
# Sticky runtimes.
|
||||||
mkdir -p $CACHE_DIR
|
if [ -f $CACHE_DIR/.heroku/python-version ]; then
|
||||||
[ ! "$(ls -A $CACHE_DIR)" ] && export FRESH_APP=1
|
DEFAULT_PYTHON_VERSION=$(cat $CACHE_DIR/.heroku/python-version)
|
||||||
|
|
||||||
|
|
||||||
# Nice defaults.
|
|
||||||
VIRTUALENV_LOC=$MODERN_VIRTUALENV_LOC
|
|
||||||
VIRTUALENV_DIRS=$MODERN_VIRTUALENV_LOC
|
|
||||||
|
|
||||||
# Support "old-style" virtualenvs.
|
|
||||||
if [ -d $CACHE_DIR/$LEGACY_VIRTUALENV_TRIGGER ]; then
|
|
||||||
LEGACY_VIRTUALENV=true
|
|
||||||
VIRTUALENV_LOC=$LEGACY_VIRTUALENV_LOC
|
|
||||||
VIRTUALENV_DIRS=$LEGACY_VIRTUALENV_DIRS
|
|
||||||
CACHED_DIRS=$LEGACY_VIRTUALENV_DIRS
|
|
||||||
|
|
||||||
# Warn for a checked-in virtualenv.
|
|
||||||
if [ -d "lib" ] || [ -d "bin" ]; then
|
|
||||||
puts-warn "You have a virtualenv checked in. You should ignore the appropriate paths in your repo. See http://devcenter.heroku.com/articles/gitignore for more info.";
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Reject a conflicting checked-in virtualenv.
|
|
||||||
if [ -f "lib/python2.7" ]; then
|
|
||||||
puts-warn "Checked-in virtualenv conflict."
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If no runtime given, assume default version.
|
||||||
|
if [ ! -f runtime.txt ]; then
|
||||||
|
echo $DEFAULT_PYTHON_VERSION > runtime.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ### The Cache
|
||||||
|
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
|
||||||
|
bpwatch stop clear_old_venvs
|
||||||
|
|
||||||
# Restore old artifacts from the cache.
|
# Restore old artifacts from the cache.
|
||||||
for dir in $CACHED_DIRS; do
|
bpwatch start restore_cache
|
||||||
cp -R $CACHE_DIR/$dir . &> /dev/null || true
|
for dir in $CACHED_DIRS; do
|
||||||
done
|
cp -R $CACHE_DIR/$dir . &> /dev/null || true
|
||||||
|
done
|
||||||
|
bpwatch stop restore_cache
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
# Create set-aside `.heroku` folder.
|
# Create set-aside `.heroku` folder.
|
||||||
mkdir .heroku &> /dev/null
|
mkdir .heroku &> /dev/null
|
||||||
HEROKU_DIR_STATUS=$?
|
|
||||||
|
|
||||||
# TODO: This is a new app, disable injection.
|
|
||||||
# [ $HEROKU_DIR_STATUS -eq 0 ] && {
|
|
||||||
# TODO: touch .heroku/injection_disabled
|
|
||||||
# }
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Buildpack profile init script
|
|
||||||
mkdir -p $(dirname $PROFILE_PATH)
|
mkdir -p $(dirname $PROFILE_PATH)
|
||||||
|
|
||||||
# ### Virtualenv Setup
|
|
||||||
#
|
|
||||||
|
|
||||||
# Create the virtualenv. Rebuild if corrupt.
|
|
||||||
# TODO: Bootstrap a bottled Python VM...
|
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
puts-step "Preparing Python interpreter ($PYTHON_VERSION)"
|
PYTHON_VERSION=$(cat runtime.txt)
|
||||||
puts-step "Creating Virtualenv ($(virtualenv --version))"
|
|
||||||
|
|
||||||
# Try to create the virtualenv.
|
# Install Python.
|
||||||
OUT=$(virtualenv --python $PYTHON_EXE --distribute --never-download --prompt='(venv) ' $VIRTUALENV_LOC 2>&1)
|
if [ -f .heroku/python-version ]; then
|
||||||
|
if [ ! $(cat .heroku/python-version) = $PYTHON_VERSION ]; then
|
||||||
[ $? -ne 0 -o -n "$CLEAN_VIRTUALENV" ] && {
|
bpwatch start uninstall_python
|
||||||
if [ -n "$CLEAN_VIRTUALENV" ]
|
puts-step "Found $(cat .heroku/python-version), removing."
|
||||||
then echo " ! CLEAN_VIRTUALENV set, rebuilding virtualenv."
|
rm -fr .heroku/python
|
||||||
else echo " ! Virtualenv corrupt, rebuilding."
|
bpwatch stop uninstall_python
|
||||||
|
else
|
||||||
|
SKIP_INSTALL=1
|
||||||
fi
|
fi
|
||||||
for dir in $VIRTUALENV_DIRS; do
|
fi
|
||||||
rm -fr $dir &> /dev/null || true
|
|
||||||
done
|
|
||||||
OUT=$(virtualenv --python $PYTHON_EXE --distribute --never-download --prompt='(venv) ' $VIRTUALENV_LOC )
|
if [ ! "$SKIP_INSTALL" ]; then
|
||||||
}
|
bpwatch start install_python
|
||||||
echo "$OUT" | cleanup | indent
|
puts-step "Preparing Python runtime ($PYTHON_VERSION)"
|
||||||
|
|
||||||
|
# Prepare destination directory.
|
||||||
|
mkdir -p .heroku/python
|
||||||
|
|
||||||
|
curl http://lang-python.s3.amazonaws.com/runtimes/$PYTHON_VERSION.tar.gz -s | tar zxv -C .heroku/python &> /dev/null
|
||||||
|
if [[ $? != 0 ]] ; then
|
||||||
|
puts-warn "Requested runtime ($PYTHON_VERSION) was not found."
|
||||||
|
puts-warn "Aborting. More info: https://devcenter.heroku.com/articles/python-support"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
bpwatch stop install_python
|
||||||
|
|
||||||
|
# Record for future reference.
|
||||||
|
echo $PYTHON_VERSION > .heroku/python-version
|
||||||
|
FRESH_PYTHON=true
|
||||||
|
|
||||||
|
hash -r
|
||||||
|
else
|
||||||
|
puts-step "Using Python runtime ($PYTHON_VERSION)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If Pip isn't up to date:
|
||||||
|
if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_VERSION* ]]; then
|
||||||
|
WORKING_DIR=$(pwd)
|
||||||
|
|
||||||
|
bpwatch start prepare_environment
|
||||||
|
|
||||||
|
bpwatch start install_setuptools
|
||||||
|
# Prepare it for the real world
|
||||||
|
puts-step "Installing Setuptools ($SETUPTOOLS_VERSION)"
|
||||||
|
cd $ROOT_DIR/vendor/
|
||||||
|
tar zxf setuptools-$SETUPTOOLS_VERSION.tar.gz
|
||||||
|
cd $ROOT_DIR/vendor/setuptools-$SETUPTOOLS_VERSION/
|
||||||
|
python setup.py install &> /dev/null
|
||||||
|
cd $WORKING_DIR
|
||||||
|
bpwatch stop install_setuptoools
|
||||||
|
|
||||||
|
bpwatch start install_pip
|
||||||
|
puts-step "Installing Pip ($PIP_VERSION)"
|
||||||
|
|
||||||
|
cd $ROOT_DIR/vendor/
|
||||||
|
tar zxf pip-$PIP_VERSION.tar.gz
|
||||||
|
cd $ROOT_DIR/vendor/pip-$PIP_VERSION/
|
||||||
|
python setup.py install &> /dev/null
|
||||||
|
cd $WORKING_DIR
|
||||||
|
|
||||||
|
bpwatch stop install_pip
|
||||||
|
bpwatch stop prepare_environment
|
||||||
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
hash -r
|
||||||
|
|
||||||
# Pylibmc support.
|
# Pylibmc support.
|
||||||
# See [`bin/steps/pylibmc`](pylibmc.html).
|
# See [`bin/steps/pylibmc`](pylibmc.html).
|
||||||
source $BIN_DIR/steps/pylibmc
|
bpwatch start pylibmc_install
|
||||||
|
source $BIN_DIR/steps/pylibmc
|
||||||
# Activate the Virtualenv.
|
bpwatch stop pylibmc_install
|
||||||
source $VIRTUALENV_LOC/bin/activate
|
|
||||||
|
|
||||||
# Install Mercurial if it appears to be required.
|
# Install Mercurial if it appears to be required.
|
||||||
if (grep -Fiq "hg+" requirements.txt) then
|
if (grep -Fiq "hg+" requirements.txt) then
|
||||||
pip install --use-mirrors mercurial | cleanup | indent
|
bpwatch start mercurial_install
|
||||||
|
/app/.heroku/python/bin/pip install mercurial | cleanup | indent
|
||||||
|
bpwatch stop mercurial_install
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install dependencies with Pip.
|
# Install dependencies with Pip.
|
||||||
puts-step "Installing dependencies using pip ($(pip --version | awk '{print $2}'))"
|
puts-step "Installing dependencies using Pip ($PIP_VERSION)"
|
||||||
pip install --use-mirrors -r requirements.txt --exists-action=w --src=./.heroku/src | cleanup | indent
|
|
||||||
|
|
||||||
# Do additional application hackery if applications appears to be a Django app.
|
|
||||||
# Optionally, disable all Django-specific changes with `DISABLE_INJECTION` env.
|
|
||||||
#
|
|
||||||
# See [`bin/steps/django`](django.html).
|
|
||||||
|
|
||||||
if [ "$NAME" = "Python/Django" ]; then
|
[ ! "$FRESH_PYTHON" ] && bpwatch start pip_install
|
||||||
source $BIN_DIR/steps/django/init
|
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
|
||||||
fi
|
|
||||||
|
|
||||||
# Make Virtualenv's paths relative for portability.
|
/app/.heroku/python/bin/pip install -r requirements.txt --exists-action=w --src=./.heroku/src --allow-all-external | cleanup | indent
|
||||||
set +e
|
|
||||||
OUT=$(virtualenv --python $PYTHON_EXE --relocatable $VIRTUALENV_LOC)
|
[ ! "$FRESH_PYTHON" ] && bpwatch stop pip_install
|
||||||
[ $? -ne 0 ] && {
|
[ "$FRESH_PYTHON" ] && bpwatch stop pip_install_first
|
||||||
puts-warn "Error making virtualenv relocatable"
|
|
||||||
echo "$OUT" | indent
|
# Django collectstatic support.
|
||||||
exit 1
|
bpwatch start collectstatic
|
||||||
}
|
sub-env $BIN_DIR/steps/collectstatic
|
||||||
set -e
|
bpwatch stop collectstatic
|
||||||
|
|
||||||
# ### Finalize
|
# ### Finalize
|
||||||
#
|
#
|
||||||
|
|
||||||
# Store new artifacts in cache.
|
|
||||||
for dir in $CACHED_DIRS; do
|
|
||||||
rm -rf $CACHE_DIR/$dir
|
|
||||||
cp -R $dir $CACHE_DIR/
|
|
||||||
done
|
|
||||||
|
|
||||||
# Set context environment variables.
|
# Set context environment variables.
|
||||||
if [ ! -n "$LEGACY_VIRTUALENV" ]; then
|
set-env PATH '$HOME/.heroku/python/bin:$PATH'
|
||||||
set-env PATH '$HOME/.heroku/venv/bin:$PATH'
|
set-env PYTHONUNBUFFERED true
|
||||||
set-default-env PYTHONUNBUFFERED true
|
set-env PYTHONHOME /app/.heroku/python
|
||||||
set-default-env LIBRARY_PATH /app/.heroku/vendor/lib
|
set-env LIBRARY_PATH /app/.heroku/vendor/lib:/app/.heroku/python/lib
|
||||||
set-default-env LD_LIBRARY_PATH /app/.heroku/vendor/lib
|
set-env LD_LIBRARY_PATH '/app/.heroku/vendor/lib:/app/.heroku/python/lib:$LD_LIBRARY_PATH'
|
||||||
set-default-env LANG en_US.UTF-8
|
set-default-env LANG en_US.UTF-8
|
||||||
set-default-env PYTHONHASHSEED random
|
set-default-env PYTHONHASHSEED random
|
||||||
set-default-env PYTHONHOME /app/.heroku/venv/
|
set-default-env PYTHONPATH /app/
|
||||||
set-default-env PYTHONPATH /app/
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ### Fin.
|
|
||||||
|
|
||||||
# Experimental post_compile hook.
|
# Experimental post_compile hook.
|
||||||
source $BIN_DIR/steps/hooks/post_compile
|
bpwatch start post_compile
|
||||||
|
source $BIN_DIR/steps/hooks/post_compile
|
||||||
|
bpwatch stop post_compile
|
||||||
|
|
||||||
# <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>
|
# Store new artifacts in cache.
|
||||||
|
bpwatch start dump_cache
|
||||||
|
for dir in $CACHED_DIRS; do
|
||||||
|
rm -rf $CACHE_DIR/$dir
|
||||||
|
cp -R $dir $CACHE_DIR/
|
||||||
|
done
|
||||||
|
bpwatch stop dump_cache
|
||||||
|
|
||||||
|
# ### Fin.
|
||||||
|
bpwatch start appdir_commit
|
||||||
|
deep-mv $BUILD_DIR $ORIG_BUILD_DIR
|
||||||
|
bpwatch stop appdir_commit
|
||||||
|
|
||||||
|
bpwatch start anvil_appdir_commit
|
||||||
|
if [ "$SLUG_ID" ]; then
|
||||||
|
deep-mv $TMP_APP_DIR $APP_DIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
bpwatch stop anvil_appdir_commit
|
||||||
|
bpwatch stop compile
|
||||||
|
|||||||
+1
-43
@@ -19,46 +19,4 @@ if [ ! -f $BUILD_DIR/requirements.txt ] && [ ! -f $BUILD_DIR/setup.py ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If only `setup.py`, assume that the app is not Django.
|
echo Python
|
||||||
if [ ! -f $BUILD_DIR/requirements.txt ]; then
|
|
||||||
echo Python
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# `Python/Django` if `**/settings.py` is present and `django` exists in
|
|
||||||
# `requirements.txt`.
|
|
||||||
#
|
|
||||||
# Otherwise, `Python`.
|
|
||||||
|
|
||||||
array=""
|
|
||||||
list_requirements() {
|
|
||||||
IFS_BAK=$IFS
|
|
||||||
IFS="
|
|
||||||
"
|
|
||||||
requirement_file=$1
|
|
||||||
reqs=$(cat $requirement_file)
|
|
||||||
for req in $reqs; do
|
|
||||||
if [[ $req == -r* ]]; then
|
|
||||||
new_req=$(echo $req | cut -d" " -f2)
|
|
||||||
if [[ $new_req == $1 ]]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
directory=$(dirname $requirement_file)
|
|
||||||
if [[ ! $array == *$directory/$new_req* ]]; then
|
|
||||||
list_requirements "$directory/$new_req"
|
|
||||||
fi
|
|
||||||
array="$array $directory/$new_req"
|
|
||||||
else
|
|
||||||
echo $req;
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
IFS=$IFS_BAK
|
|
||||||
IFS_BAK=
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SETTINGS_FILE=$(find $BUILD_DIR/. -maxdepth 2 -type f -name 'settings.py' | head -1)
|
|
||||||
|
|
||||||
|
|
||||||
[ -n "$SETTINGS_FILE" ] && ( list_requirements $BUILD_DIR/requirements.txt | grep -Fiq "django" ) && echo Python/Django || echo Python
|
|
||||||
|
|||||||
+7
-19
@@ -3,33 +3,21 @@
|
|||||||
|
|
||||||
BIN_DIR=$(cd $(dirname $0); pwd) # absolute path
|
BIN_DIR=$(cd $(dirname $0); pwd) # absolute path
|
||||||
BUILD_DIR=$1
|
BUILD_DIR=$1
|
||||||
NAME=$($BIN_DIR/detect $BUILD_DIR) || exit 1
|
|
||||||
|
MANAGE_FILE=$(cd $BUILD_DIR && find . -maxdepth 3 -type f -name 'manage.py' | head -1)
|
||||||
|
MANAGE_FILE=${MANAGE_FILE:2}
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
---
|
---
|
||||||
config_vars:
|
config_vars:
|
||||||
PATH: /app/.heroku/venv/bin:/bin:/usr/local/bin:/usr/bin
|
|
||||||
PYTHONUNBUFFERED: true
|
|
||||||
LIBRARY_PATH: /app/.heroku/vendor/lib
|
|
||||||
LD_LIBRARY_PATH: /app/.heroku/vendor/lib
|
|
||||||
LANG: en_US.UTF-8
|
|
||||||
PYTHONHASHSEED: random
|
|
||||||
PYTHONHOME: /app/.heroku/venv/
|
|
||||||
PYTHONPATH: /app/
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
[ "$NAME" = "Python/Django" ] || exit 0
|
if [[ $MANAGE_FILE ]]; then
|
||||||
|
|
||||||
MANAGE_FILE=$(cd $BUILD_DIR && find . -maxdepth 3 -type f -name 'manage.py' | head -1)
|
|
||||||
MANAGE_FILE=${MANAGE_FILE:2}
|
|
||||||
PROJECT=$(dirname $MANAGE_FILE)
|
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
shared-database:5mb
|
heroku-postgresql:hobby-dev
|
||||||
|
|
||||||
default_process_types:
|
|
||||||
web: python $PROJECT/manage.py runserver 0.0.0.0:\$PORT --noreload
|
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|||||||
Executable
+36
@@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source $BIN_DIR/utils
|
||||||
|
|
||||||
|
MANAGE_FILE=$(find . -maxdepth 3 -type f -name 'manage.py' | head -1)
|
||||||
|
MANAGE_FILE=${MANAGE_FILE:-fakepath}
|
||||||
|
|
||||||
|
[ -f .heroku/collectstatic_disabled ] && DISABLE_COLLECTSTATIC=1
|
||||||
|
|
||||||
|
if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ]; then
|
||||||
|
set +e
|
||||||
|
|
||||||
|
echo "-----> Preparing static assets"
|
||||||
|
# Check if collectstatic is configured properly.
|
||||||
|
python $MANAGE_FILE collectstatic --dry-run --noinput &> /dev/null && RUN_COLLECTSTATIC=true
|
||||||
|
|
||||||
|
# Compile assets if collectstatic appears to be kosher.
|
||||||
|
if [ "$RUN_COLLECTSTATIC" ]; then
|
||||||
|
|
||||||
|
echo " Running collectstatic..."
|
||||||
|
python $MANAGE_FILE collectstatic --noinput 2>&1 | sed '/^Copying/d;/^$/d;/^ /d' | indent
|
||||||
|
|
||||||
|
[ $? -ne 0 ] && {
|
||||||
|
echo " ! Error running 'manage.py collectstatic'. More info:"
|
||||||
|
echo " http://devcenter.heroku.com/articles/django-assets"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
echo " Collectstatic configuration error. To debug, run:"
|
||||||
|
echo " $ heroku run python $MANAGE_FILE collectstatic --noinput"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set +e
|
|
||||||
|
|
||||||
# Syntax sugar.
|
|
||||||
indent() {
|
|
||||||
RE="s/^/ /"
|
|
||||||
[ $(uname) == "Darwin" ] && sed -l "$RE" || sed -u "$RE"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Check if collectstatic is configured properly.
|
|
||||||
python $MANAGE_FILE collectstatic --dry-run --noinput &> /dev/null && RUN_COLLECTSTATIC=true
|
|
||||||
|
|
||||||
# Compile assets if collectstatic appears to be kosher.
|
|
||||||
if [ "$RUN_COLLECTSTATIC" ]; then
|
|
||||||
|
|
||||||
echo "-----> Collecting static files"
|
|
||||||
python $MANAGE_FILE collectstatic --noinput 2>&1 | sed '/^Copying/d;/^$/d;/^ /d' | indent
|
|
||||||
|
|
||||||
[ $? -ne 0 ] && {
|
|
||||||
echo " ! Error running manage.py collectstatic. More info:"
|
|
||||||
echo " http://devcenter.heroku.com/articles/django-assets"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
|
||||||
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
SETTINGS_FILE=$(find . -maxdepth 3 -type f -name 'settings.py' | head -1)
|
|
||||||
PROJECT=$(dirname $SETTINGS_FILE)
|
|
||||||
MANAGE_FILE=$(find . -maxdepth 3 -type f -name 'manage.py' | head -1)
|
|
||||||
MANAGE_FILE=${MANAGE_FILE:2}
|
|
||||||
|
|
||||||
if [ "$FRESH_APP" ]; then
|
|
||||||
# Legacy Django injection for existing applications.
|
|
||||||
touch .heroku/injection_disabled
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Disable injection for new applications.
|
|
||||||
if [ -f .heroku/injection_disabled ]; then
|
|
||||||
DISABLE_INJECTION=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f .heroku/collectstatic_disabled ]; then
|
|
||||||
DISABLE_COLLECTSTATIC=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
export SETTINGS_FILE MANAGE_FILE PROJECT DISABLE_INJECTION
|
|
||||||
|
|
||||||
if [ ! "$DISABLE_INJECTION" ]; then
|
|
||||||
# Legacy Django injection for existing applications.
|
|
||||||
source $BIN_DIR/steps/django/injection
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! "$DISABLE_COLLECTSTATIC" ]; then
|
|
||||||
source $BIN_DIR/steps/django/collectstatic
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# This script serves as the Django injection build step of the
|
|
||||||
# [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
|
|
||||||
# compiler.
|
|
||||||
#
|
|
||||||
# A [buildpack](http://devcenter.heroku.com/articles/buildpacks) is an
|
|
||||||
# adapter between a Python application and Heroku's runtime.
|
|
||||||
#
|
|
||||||
# This script is invoked by [`bin/compile`](/).
|
|
||||||
|
|
||||||
# ## Sanity Checks
|
|
||||||
#
|
|
||||||
|
|
||||||
# Syntax sugar.
|
|
||||||
indent() {
|
|
||||||
RE="s/^/ /"
|
|
||||||
[ $(uname) == "Darwin" ] && sed -l "$RE" || sed -u "$RE"
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "-----> Injecting legacy Django settings..."
|
|
||||||
echo " ! WARNING: Settings injection will be fully deprecated on January 1, 2013. More info:"
|
|
||||||
echo " ! https://devcenter.heroku.com/articles/django-injection "
|
|
||||||
|
|
||||||
|
|
||||||
echo "-----> Installing dj-database-url..."
|
|
||||||
pip install --use-mirrors 'dj-database-url>=0.2.0' | indent
|
|
||||||
|
|
||||||
SETTINGS_FILE=$(find . -maxdepth 2 -type f -name 'settings.py' | head -1)
|
|
||||||
PROJECT=$(dirname $SETTINGS_FILE)
|
|
||||||
|
|
||||||
echo "Injecting code into $SETTINGS_FILE to read from DATABASE_URL" | indent
|
|
||||||
|
|
||||||
cat >>$SETTINGS_FILE <<EOF
|
|
||||||
|
|
||||||
import dj_database_url
|
|
||||||
|
|
||||||
if 'DATABASES' not in locals():
|
|
||||||
DATABASES = {}
|
|
||||||
|
|
||||||
if not 'default' in DATABASES:
|
|
||||||
DATABASES['default'] = {}
|
|
||||||
|
|
||||||
DATABASES['default'].update(dj_database_url.config(default='postgres://'))
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
Regular → Executable
+1
-1
@@ -3,5 +3,5 @@
|
|||||||
if [ -f bin/post_compile ]; then
|
if [ -f bin/post_compile ]; then
|
||||||
echo "-----> Running post-compile hook"
|
echo "-----> Running post-compile hook"
|
||||||
chmod +x bin/post_compile
|
chmod +x bin/post_compile
|
||||||
bin/post_compile
|
sub-env bin/post_compile
|
||||||
fi
|
fi
|
||||||
Regular → Executable
+1
-1
@@ -3,5 +3,5 @@
|
|||||||
if [ -f bin/pre_compile ]; then
|
if [ -f bin/pre_compile ]; then
|
||||||
echo "-----> Running pre-compile hook"
|
echo "-----> Running pre-compile hook"
|
||||||
chmod +x bin/pre_compile
|
chmod +x bin/pre_compile
|
||||||
bin/pre_compile
|
sub-env bin/pre_compile
|
||||||
fi
|
fi
|
||||||
+8
-5
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# This script serves as the Pylibmc build step of the
|
# This script serves as the Pylibmc build step of 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.
|
||||||
#
|
#
|
||||||
# This script is invoked by [`bin/compile`](/).
|
# This script is invoked by [`bin/compile`](/).
|
||||||
@@ -12,8 +12,11 @@
|
|||||||
# The location of the pre-compiled libmemcached binary.
|
# The location of the pre-compiled libmemcached binary.
|
||||||
VENDORED_MEMCACHED="http://cl.ly/0a191R3K160t1w1P0N25/vendor-libmemcached.tar.gz"
|
VENDORED_MEMCACHED="http://cl.ly/0a191R3K160t1w1P0N25/vendor-libmemcached.tar.gz"
|
||||||
|
|
||||||
|
# Syntax sugar.
|
||||||
|
source $BIN_DIR/utils
|
||||||
|
|
||||||
# If pylibmc exists within requirements, use vendored libmemcached.
|
# If pylibmc exists within requirements, use vendored libmemcached.
|
||||||
if (grep -Fiq "pylibmc" requirements.txt) then
|
if (grep -Eiq "\s*pylibmc" requirements.txt) then
|
||||||
echo "-----> Noticed pylibmc. Bootstrapping libmemcached."
|
echo "-----> Noticed pylibmc. Bootstrapping libmemcached."
|
||||||
cd .heroku
|
cd .heroku
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Create a Heroku app with the following buildpack:
|
# Create a Heroku app with the following buildpack:
|
||||||
# https://github.com/ddollar/buildpack-tet
|
# https://github.com/ddollar/buildpack-test
|
||||||
#
|
#
|
||||||
# Push this Python buildpack to that Heroku app to
|
# Push this Python buildpack to that Heroku app to
|
||||||
# run the tests.
|
# run the tests.
|
||||||
@@ -20,15 +20,27 @@ testDetectWithEmptyReqs() {
|
|||||||
assertCapturedSuccess
|
assertCapturedSuccess
|
||||||
}
|
}
|
||||||
|
|
||||||
|
testDetectDjango16() {
|
||||||
|
detect "django-1.6-skeleton"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectDjango15() {
|
||||||
|
detect "django-1.5-skeleton"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
testDetectDjango14() {
|
testDetectDjango14() {
|
||||||
detect "django-1.4-skeleton"
|
detect "django-1.4-skeleton"
|
||||||
assertCapturedEquals "Python/Django"
|
assertCapturedEquals "Python"
|
||||||
assertCapturedSuccess
|
assertCapturedSuccess
|
||||||
}
|
}
|
||||||
|
|
||||||
testDetectDjango13() {
|
testDetectDjango13() {
|
||||||
detect "django-1.3-skeleton"
|
detect "django-1.3-skeleton"
|
||||||
assertCapturedEquals "Python/Django"
|
assertCapturedEquals "Python"
|
||||||
assertCapturedSuccess
|
assertCapturedSuccess
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,6 +68,23 @@ testDetectNotPython() {
|
|||||||
assertEquals "1" "${RETURN}"
|
assertEquals "1" "${RETURN}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
testDetectSimpleRuntimePypy2() {
|
||||||
|
detect "simple-runtime-pypy2"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectSimpleRuntimePython2() {
|
||||||
|
detect "simple-runtime-python2"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectSimpleRuntimePython3() {
|
||||||
|
detect "simple-runtime" # should probably be renamed simple-runtime-python3
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
## utils ########################################
|
## utils ########################################
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +1,93 @@
|
|||||||
|
shopt -s extglob
|
||||||
|
|
||||||
|
if [ $(uname) == Darwin ]; then
|
||||||
|
sed() { command sed -l "$@"; }
|
||||||
|
else
|
||||||
|
sed() { command sed -u "$@"; }
|
||||||
|
fi
|
||||||
|
|
||||||
# Syntax sugar.
|
# Syntax sugar.
|
||||||
indent() {
|
indent() {
|
||||||
RE="s/^/ /"
|
sed "s/^/ /"
|
||||||
[ $(uname) == "Darwin" ] && sed -l "$RE" || sed -u "$RE"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clean up pip output
|
# Clean up pip output
|
||||||
cleanup() {
|
cleanup() {
|
||||||
sed -e 's/\.\.\.\+/.../g' | sed -e '/already satisfied/Id' | sed -e '/Overwriting/Id' | sed -e '/python executable/Id' | sed -e '/no previously-included files/Id'
|
sed -e 's/\.\.\.\+/.../g' | sed -e '/already satisfied/Id' | sed -e '/Overwriting/Id' | sed -e '/python executable/Id' | sed -e '/no previously-included files/Id'
|
||||||
}
|
|
||||||
|
|
||||||
# Virtualenv wrapper.
|
|
||||||
function virtualenv (){
|
|
||||||
python "$ROOT_DIR/vendor/virtualenv-1.8.4/virtualenv.py" "$@"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Buildpack Steps.
|
# Buildpack Steps.
|
||||||
function puts-step (){
|
puts-step() {
|
||||||
echo "-----> $@"
|
echo "-----> $@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Buildpack Warnings.
|
# Buildpack Warnings.
|
||||||
function puts-warn (){
|
puts-warn() {
|
||||||
echo " ! $@"
|
echo " ! $@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Usage: $ set-env key value
|
# Usage: $ set-env key value
|
||||||
function set-env (){
|
set-env() {
|
||||||
echo "export $1=$2" >> $PROFILE_PATH
|
echo "export $1=$2" >> $PROFILE_PATH
|
||||||
}
|
}
|
||||||
|
|
||||||
# Usage: $ set-default-env key value
|
# Usage: $ set-default-env key value
|
||||||
function set-default-env (){
|
set-default-env() {
|
||||||
echo "export $1=\${$1:-$2}" >> $PROFILE_PATH
|
echo "export $1=\${$1:-$2}" >> $PROFILE_PATH
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Usage: $ set-default-env key value
|
||||||
|
un-set-env() {
|
||||||
|
echo "unset $1" >> $PROFILE_PATH
|
||||||
|
}
|
||||||
|
|
||||||
|
# Does some serious copying.
|
||||||
|
deep-cp() {
|
||||||
|
declare source="$1" target="$2"
|
||||||
|
|
||||||
|
mkdir -p "$target"
|
||||||
|
|
||||||
|
# cp doesn't like being called without source params,
|
||||||
|
# so make sure they expand to something first.
|
||||||
|
# subshell to avoid surprising caller with shopts.
|
||||||
|
(
|
||||||
|
shopt -s nullglob dotglob
|
||||||
|
set -- "$source"/!(tmp|.|..)
|
||||||
|
[[ $# == 0 ]] || cp -a "$@" "$target"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Does some serious moving.
|
||||||
|
deep-mv() {
|
||||||
|
deep-cp "$1" "$2"
|
||||||
|
deep-rm "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Does some serious deleting.
|
||||||
|
deep-rm() {
|
||||||
|
# subshell to avoid surprising caller with shopts.
|
||||||
|
(
|
||||||
|
shopt -s dotglob
|
||||||
|
rm -rf "$1"/!(tmp|.|..)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub-env() {
|
||||||
|
|
||||||
|
WHITELIST=${2:-''}
|
||||||
|
BLACKLIST=${3:-'^(GIT_DIR|PYTHONHOME|LD_LIBRARY_PATH|LIBRARY_PATH|PATH)$'}
|
||||||
|
|
||||||
|
(
|
||||||
|
if [ -d "$ENV_DIR" ]; then
|
||||||
|
for e in $(ls $ENV_DIR); do
|
||||||
|
echo "$e" | grep -E "$WHITELIST" | grep -qvE "$BLACKLIST" &&
|
||||||
|
export "$e=$(cat $ENV_DIR/$e)"
|
||||||
|
:
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
$1
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# Python Buildpack Binaries
|
||||||
|
|
||||||
|
|
||||||
|
To get started with it, create an app on Heroku inside a clone of this repository, and set your S3 config vars:
|
||||||
|
|
||||||
|
$ heroku create --buildpack https://github.com/heroku/heroku-buildpack-python#not-heroku
|
||||||
|
$ heroku config:set WORKSPACE_DIR=builds
|
||||||
|
$ heroku config:set AWS_ACCESS_KEY_ID=<your_aws_key>
|
||||||
|
$ heroku config:set AWS_SECRET_ACCESS_KEY=<your_aws_secret>
|
||||||
|
$ heroku config:set S3_BUCKET=<your_s3_bucket_name>
|
||||||
|
|
||||||
|
|
||||||
|
Then, shell into an instance and run a build by giving the name of the formula inside `builds`:
|
||||||
|
|
||||||
|
$ heroku run bash
|
||||||
|
Running `bash` attached to terminal... up, run.6880
|
||||||
|
~ $ bob build runtimes/python-2.7.6
|
||||||
|
|
||||||
|
Fetching dependencies... found 2:
|
||||||
|
- libraries/sqlite
|
||||||
|
|
||||||
|
Building formula runtimes/python-2.7.6:
|
||||||
|
=== Building Python 2.7.6
|
||||||
|
Fetching Python v2.7.6 source...
|
||||||
|
Compiling...
|
||||||
|
|
||||||
|
If this works, run `bob deploy` instead of `bob build` to have the result uploaded to S3 for you.
|
||||||
|
|
||||||
|
To speed things up drastically, it'll usually be a good idea to `heroku run bash --size PX` instead.
|
||||||
|
|
||||||
|
Enjoy :)
|
||||||
Executable
+22
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building SQLite..."
|
||||||
|
|
||||||
|
|
||||||
|
SOURCE_TARBALL='http://www.sqlite.org/sqlite-autoconf-3070900.tar.gz'
|
||||||
|
|
||||||
|
curl $SOURCE_TARBALL | tar xz
|
||||||
|
# jx
|
||||||
|
mv sqlite-autoconf-3070900 sqlite
|
||||||
|
|
||||||
|
cd sqlite
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
cd ..
|
||||||
|
rm -fr sqlite
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-1.7-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-1.7/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-1.8/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-1.9/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.4 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.4.4/Python-2.4.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.4.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.4 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.4.5/Python-2.4.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.4.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.4 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.4.6/Python-2.4.6.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.4.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.5/Python-2.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.5.1/Python-2.5.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.5.2/Python-2.5.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.5.3/Python-2.5.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.5.4/Python-2.5.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.5.5/Python-2.5.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.5.6/Python-2.5.6.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://www.python.org/ftp/python/2.6/Python-2.6.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
mv Python-2.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.6.1/Python-2.6.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.6.2/Python-2.6.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.6.3/Python-2.6.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.6.4/Python-2.6.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.6.5/Python-2.6.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.6.6/Python-2.6.6.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.6.7/Python-2.6.7.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.7 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.6.8/Python-2.6.8.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.8 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.6.9/Python-2.6.9.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.9 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7/Python-2.7.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7.1/Python-2.7.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7.2/Python-2.7.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7.3/Python-2.7.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7.4/Python-2.7.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7.5/Python-2.7.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7.7/Python-2.7.7.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.7 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7.7/Python-2.7.7.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.7 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7.8/Python-2.7.8.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.8 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/2.7.8/Python-2.7.8.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.8 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.1/Python-3.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.1.1/Python-3.1.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.1.2/Python-3.1.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.1.3/Python-3.1.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.1.4/Python-3.1.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.1.5/Python-3.1.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.2/Python-3.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.2.1/Python-3.2.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.2.2/Python-3.2.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.2.3/Python-3.2.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.2.4/Python-3.2.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.2.5/Python-3.2.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.3.0/Python-3.3.0.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.0 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.3.1/Python-3.3.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.3.2/Python-3.3.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.3.3/Python-3.3.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.3.4/Python-3.3.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.4.0/Python-3.4.0.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.4.0 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='http://python.org/ftp/python/3.4.1/Python-3.4.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.4.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
bob-builder==0.0.5
|
||||||
@@ -168,7 +168,7 @@ def run(command, data=None, timeout=None, env=None):
|
|||||||
history = []
|
history = []
|
||||||
for c in command:
|
for c in command:
|
||||||
|
|
||||||
if len(history):
|
if history:
|
||||||
# due to broken pipe problems pass only first 10MB
|
# due to broken pipe problems pass only first 10MB
|
||||||
data = history[-1].std_out[0:10*1024]
|
data = history[-1].std_out[0:10*1024]
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,156 @@
|
|||||||
|
# Django settings for haystack project.
|
||||||
|
|
||||||
|
DEBUG = True
|
||||||
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
|
||||||
|
ADMINS = (
|
||||||
|
# ('Your Name', 'your_email@example.com'),
|
||||||
|
)
|
||||||
|
|
||||||
|
MANAGERS = ADMINS
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
||||||
|
'NAME': '', # Or path to database file if using sqlite3.
|
||||||
|
# The following settings are not used with sqlite3:
|
||||||
|
'USER': '',
|
||||||
|
'PASSWORD': '',
|
||||||
|
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
|
||||||
|
'PORT': '', # Set to empty string for default.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
||||||
|
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
||||||
|
ALLOWED_HOSTS = []
|
||||||
|
|
||||||
|
# Local time zone for this installation. Choices can be found here:
|
||||||
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||||
|
# although not all choices may be available on all operating systems.
|
||||||
|
# In a Windows environment this must be set to your system time zone.
|
||||||
|
TIME_ZONE = 'America/Chicago'
|
||||||
|
|
||||||
|
# Language code for this installation. All choices can be found here:
|
||||||
|
# http://www.i18nguy.com/unicode/language-identifiers.html
|
||||||
|
LANGUAGE_CODE = 'en-us'
|
||||||
|
|
||||||
|
SITE_ID = 1
|
||||||
|
|
||||||
|
# If you set this to False, Django will make some optimizations so as not
|
||||||
|
# to load the internationalization machinery.
|
||||||
|
USE_I18N = True
|
||||||
|
|
||||||
|
# If you set this to False, Django will not format dates, numbers and
|
||||||
|
# calendars according to the current locale.
|
||||||
|
USE_L10N = True
|
||||||
|
|
||||||
|
# If you set this to False, Django will not use timezone-aware datetimes.
|
||||||
|
USE_TZ = True
|
||||||
|
|
||||||
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
||||||
|
# Example: "/var/www/example.com/media/"
|
||||||
|
MEDIA_ROOT = ''
|
||||||
|
|
||||||
|
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
||||||
|
# trailing slash.
|
||||||
|
# Examples: "http://example.com/media/", "http://media.example.com/"
|
||||||
|
MEDIA_URL = ''
|
||||||
|
|
||||||
|
# Absolute path to the directory static files should be collected to.
|
||||||
|
# Don't put anything in this directory yourself; store your static files
|
||||||
|
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
||||||
|
# Example: "/var/www/example.com/static/"
|
||||||
|
STATIC_ROOT = ''
|
||||||
|
|
||||||
|
# URL prefix for static files.
|
||||||
|
# Example: "http://example.com/static/", "http://static.example.com/"
|
||||||
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
|
# Additional locations of static files
|
||||||
|
STATICFILES_DIRS = (
|
||||||
|
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
||||||
|
# Always use forward slashes, even on Windows.
|
||||||
|
# Don't forget to use absolute paths, not relative paths.
|
||||||
|
)
|
||||||
|
|
||||||
|
# List of finder classes that know how to find static files in
|
||||||
|
# various locations.
|
||||||
|
STATICFILES_FINDERS = (
|
||||||
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||||
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
|
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
||||||
|
)
|
||||||
|
|
||||||
|
# Make this unique, and don't share it with anybody.
|
||||||
|
SECRET_KEY = '@w-1$9#jh05!qvbh#1k)c4=w9llcq116f$5(4&s_c)n4@%n=pc'
|
||||||
|
|
||||||
|
# List of callables that know how to import templates from various sources.
|
||||||
|
TEMPLATE_LOADERS = (
|
||||||
|
'django.template.loaders.filesystem.Loader',
|
||||||
|
'django.template.loaders.app_directories.Loader',
|
||||||
|
# 'django.template.loaders.eggs.Loader',
|
||||||
|
)
|
||||||
|
|
||||||
|
MIDDLEWARE_CLASSES = (
|
||||||
|
'django.middleware.common.CommonMiddleware',
|
||||||
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
|
# Uncomment the next line for simple clickjacking protection:
|
||||||
|
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
|
)
|
||||||
|
|
||||||
|
ROOT_URLCONF = 'haystack.urls'
|
||||||
|
|
||||||
|
# Python dotted path to the WSGI application used by Django's runserver.
|
||||||
|
WSGI_APPLICATION = 'haystack.wsgi.application'
|
||||||
|
|
||||||
|
TEMPLATE_DIRS = (
|
||||||
|
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
||||||
|
# Always use forward slashes, even on Windows.
|
||||||
|
# Don't forget to use absolute paths, not relative paths.
|
||||||
|
)
|
||||||
|
|
||||||
|
INSTALLED_APPS = (
|
||||||
|
'django.contrib.auth',
|
||||||
|
'django.contrib.contenttypes',
|
||||||
|
'django.contrib.sessions',
|
||||||
|
'django.contrib.sites',
|
||||||
|
'django.contrib.messages',
|
||||||
|
'django.contrib.staticfiles',
|
||||||
|
# Uncomment the next line to enable the admin:
|
||||||
|
# 'django.contrib.admin',
|
||||||
|
# Uncomment the next line to enable admin documentation:
|
||||||
|
# 'django.contrib.admindocs',
|
||||||
|
)
|
||||||
|
|
||||||
|
# A sample logging configuration. The only tangible logging
|
||||||
|
# performed by this configuration is to send an email to
|
||||||
|
# the site admins on every HTTP 500 error when DEBUG=False.
|
||||||
|
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
||||||
|
# more details on how to customize your logging configuration.
|
||||||
|
LOGGING = {
|
||||||
|
'version': 1,
|
||||||
|
'disable_existing_loggers': False,
|
||||||
|
'filters': {
|
||||||
|
'require_debug_false': {
|
||||||
|
'()': 'django.utils.log.RequireDebugFalse'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'handlers': {
|
||||||
|
'mail_admins': {
|
||||||
|
'level': 'ERROR',
|
||||||
|
'filters': ['require_debug_false'],
|
||||||
|
'class': 'django.utils.log.AdminEmailHandler'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'loggers': {
|
||||||
|
'django.request': {
|
||||||
|
'handlers': ['mail_admins'],
|
||||||
|
'level': 'ERROR',
|
||||||
|
'propagate': True,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
from django.conf.urls import patterns, include, url
|
||||||
|
|
||||||
|
# Uncomment the next two lines to enable the admin:
|
||||||
|
# from django.contrib import admin
|
||||||
|
# admin.autodiscover()
|
||||||
|
|
||||||
|
urlpatterns = patterns('',
|
||||||
|
# Examples:
|
||||||
|
# url(r'^$', 'haystack.views.home', name='home'),
|
||||||
|
# url(r'^haystack/', include('haystack.foo.urls')),
|
||||||
|
|
||||||
|
# Uncomment the admin/doc line below to enable admin documentation:
|
||||||
|
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||||
|
|
||||||
|
# Uncomment the next line to enable the admin:
|
||||||
|
# url(r'^admin/', include(admin.site.urls)),
|
||||||
|
)
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
"""
|
||||||
|
WSGI config for haystack project.
|
||||||
|
|
||||||
|
This module contains the WSGI application used by Django's development server
|
||||||
|
and any production WSGI deployments. It should expose a module-level variable
|
||||||
|
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
|
||||||
|
this application via the ``WSGI_APPLICATION`` setting.
|
||||||
|
|
||||||
|
Usually you will have the standard Django WSGI application here, but it also
|
||||||
|
might make sense to replace the whole Django WSGI application with a custom one
|
||||||
|
that later delegates to the Django one. For example, you could introduce WSGI
|
||||||
|
middleware here, or combine a Django application with an application of another
|
||||||
|
framework.
|
||||||
|
|
||||||
|
"""
|
||||||
|
import os
|
||||||
|
|
||||||
|
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
|
||||||
|
# if running multiple sites in the same mod_wsgi process. To fix this, use
|
||||||
|
# mod_wsgi daemon mode with each site in its own daemon process, or use
|
||||||
|
# os.environ["DJANGO_SETTINGS_MODULE"] = "haystack.settings"
|
||||||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "haystack.settings")
|
||||||
|
|
||||||
|
# This application object is used by any WSGI server configured to use this
|
||||||
|
# file. This includes Django's development server, if the WSGI_APPLICATION
|
||||||
|
# setting points here.
|
||||||
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
application = get_wsgi_application()
|
||||||
|
|
||||||
|
# Apply WSGI middleware here.
|
||||||
|
# from helloworld.wsgi import HelloWorldApplication
|
||||||
|
# application = HelloWorldApplication(application)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "haystack.settings")
|
||||||
|
|
||||||
|
from django.core.management import execute_from_command_line
|
||||||
|
|
||||||
|
execute_from_command_line(sys.argv)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
django==1.5
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
# Django settings for haystack project.
|
||||||
|
|
||||||
|
DEBUG = True
|
||||||
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
|
||||||
|
ADMINS = (
|
||||||
|
# ('Your Name', 'your_email@example.com'),
|
||||||
|
)
|
||||||
|
|
||||||
|
MANAGERS = ADMINS
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
||||||
|
'NAME': '', # Or path to database file if using sqlite3.
|
||||||
|
# The following settings are not used with sqlite3:
|
||||||
|
'USER': '',
|
||||||
|
'PASSWORD': '',
|
||||||
|
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
|
||||||
|
'PORT': '', # Set to empty string for default.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
||||||
|
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
||||||
|
ALLOWED_HOSTS = []
|
||||||
|
|
||||||
|
# Local time zone for this installation. Choices can be found here:
|
||||||
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||||
|
# although not all choices may be available on all operating systems.
|
||||||
|
# In a Windows environment this must be set to your system time zone.
|
||||||
|
TIME_ZONE = 'America/Chicago'
|
||||||
|
|
||||||
|
# Language code for this installation. All choices can be found here:
|
||||||
|
# http://www.i18nguy.com/unicode/language-identifiers.html
|
||||||
|
LANGUAGE_CODE = 'en-us'
|
||||||
|
|
||||||
|
SITE_ID = 1
|
||||||
|
|
||||||
|
# If you set this to False, Django will make some optimizations so as not
|
||||||
|
# to load the internationalization machinery.
|
||||||
|
USE_I18N = True
|
||||||
|
|
||||||
|
# If you set this to False, Django will not format dates, numbers and
|
||||||
|
# calendars according to the current locale.
|
||||||
|
USE_L10N = True
|
||||||
|
|
||||||
|
# If you set this to False, Django will not use timezone-aware datetimes.
|
||||||
|
USE_TZ = True
|
||||||
|
|
||||||
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
||||||
|
# Example: "/var/www/example.com/media/"
|
||||||
|
MEDIA_ROOT = ''
|
||||||
|
|
||||||
|
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
||||||
|
# trailing slash.
|
||||||
|
# Examples: "http://example.com/media/", "http://media.example.com/"
|
||||||
|
MEDIA_URL = ''
|
||||||
|
|
||||||
|
# Absolute path to the directory static files should be collected to.
|
||||||
|
# Don't put anything in this directory yourself; store your static files
|
||||||
|
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
||||||
|
# Example: "/var/www/example.com/static/"
|
||||||
|
STATIC_ROOT = ''
|
||||||
|
|
||||||
|
# URL prefix for static files.
|
||||||
|
# Example: "http://example.com/static/", "http://static.example.com/"
|
||||||
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
|
# Additional locations of static files
|
||||||
|
STATICFILES_DIRS = (
|
||||||
|
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
||||||
|
# Always use forward slashes, even on Windows.
|
||||||
|
# Don't forget to use absolute paths, not relative paths.
|
||||||
|
)
|
||||||
|
|
||||||
|
# List of finder classes that know how to find static files in
|
||||||
|
# various locations.
|
||||||
|
STATICFILES_FINDERS = (
|
||||||
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||||
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
|
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
||||||
|
)
|
||||||
|
|
||||||
|
# Make this unique, and don't share it with anybody.
|
||||||
|
SECRET_KEY = '@w-1$9#jh05!qvbh#1k)c4=w9llcq116f$5(4&s_c)n4@%n=pc'
|
||||||
|
|
||||||
|
# List of callables that know how to import templates from various sources.
|
||||||
|
TEMPLATE_LOADERS = (
|
||||||
|
'django.template.loaders.filesystem.Loader',
|
||||||
|
'django.template.loaders.app_directories.Loader',
|
||||||
|
# 'django.template.loaders.eggs.Loader',
|
||||||
|
)
|
||||||
|
|
||||||
|
MIDDLEWARE_CLASSES = (
|
||||||
|
'django.middleware.common.CommonMiddleware',
|
||||||
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
|
# Uncomment the next line for simple clickjacking protection:
|
||||||
|
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
|
)
|
||||||
|
|
||||||
|
ROOT_URLCONF = 'haystack.urls'
|
||||||
|
|
||||||
|
# Python dotted path to the WSGI application used by Django's runserver.
|
||||||
|
WSGI_APPLICATION = 'haystack.wsgi.application'
|
||||||
|
|
||||||
|
TEMPLATE_DIRS = (
|
||||||
|
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
||||||
|
# Always use forward slashes, even on Windows.
|
||||||
|
# Don't forget to use absolute paths, not relative paths.
|
||||||
|
)
|
||||||
|
|
||||||
|
INSTALLED_APPS = (
|
||||||
|
'django.contrib.auth',
|
||||||
|
'django.contrib.contenttypes',
|
||||||
|
'django.contrib.sessions',
|
||||||
|
'django.contrib.sites',
|
||||||
|
'django.contrib.messages',
|
||||||
|
'django.contrib.staticfiles',
|
||||||
|
# Uncomment the next line to enable the admin:
|
||||||
|
# 'django.contrib.admin',
|
||||||
|
# Uncomment the next line to enable admin documentation:
|
||||||
|
# 'django.contrib.admindocs',
|
||||||
|
)
|
||||||
|
|
||||||
|
# A sample logging configuration. The only tangible logging
|
||||||
|
# performed by this configuration is to send an email to
|
||||||
|
# the site admins on every HTTP 500 error when DEBUG=False.
|
||||||
|
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
||||||
|
# more details on how to customize your logging configuration.
|
||||||
|
LOGGING = {
|
||||||
|
'version': 1,
|
||||||
|
'disable_existing_loggers': False,
|
||||||
|
'filters': {
|
||||||
|
'require_debug_false': {
|
||||||
|
'()': 'django.utils.log.RequireDebugFalse'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'handlers': {
|
||||||
|
'mail_admins': {
|
||||||
|
'level': 'ERROR',
|
||||||
|
'filters': ['require_debug_false'],
|
||||||
|
'class': 'django.utils.log.AdminEmailHandler'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'loggers': {
|
||||||
|
'django.request': {
|
||||||
|
'handlers': ['mail_admins'],
|
||||||
|
'level': 'ERROR',
|
||||||
|
'propagate': True,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
from django.conf.urls import patterns, include, url
|
||||||
|
|
||||||
|
# Uncomment the next two lines to enable the admin:
|
||||||
|
# from django.contrib import admin
|
||||||
|
# admin.autodiscover()
|
||||||
|
|
||||||
|
urlpatterns = patterns('',
|
||||||
|
# Examples:
|
||||||
|
# url(r'^$', 'haystack.views.home', name='home'),
|
||||||
|
# url(r'^haystack/', include('haystack.foo.urls')),
|
||||||
|
|
||||||
|
# Uncomment the admin/doc line below to enable admin documentation:
|
||||||
|
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||||
|
|
||||||
|
# Uncomment the next line to enable the admin:
|
||||||
|
# url(r'^admin/', include(admin.site.urls)),
|
||||||
|
)
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
"""
|
||||||
|
WSGI config for haystack project.
|
||||||
|
|
||||||
|
This module contains the WSGI application used by Django's development server
|
||||||
|
and any production WSGI deployments. It should expose a module-level variable
|
||||||
|
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
|
||||||
|
this application via the ``WSGI_APPLICATION`` setting.
|
||||||
|
|
||||||
|
Usually you will have the standard Django WSGI application here, but it also
|
||||||
|
might make sense to replace the whole Django WSGI application with a custom one
|
||||||
|
that later delegates to the Django one. For example, you could introduce WSGI
|
||||||
|
middleware here, or combine a Django application with an application of another
|
||||||
|
framework.
|
||||||
|
|
||||||
|
"""
|
||||||
|
import os
|
||||||
|
|
||||||
|
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
|
||||||
|
# if running multiple sites in the same mod_wsgi process. To fix this, use
|
||||||
|
# mod_wsgi daemon mode with each site in its own daemon process, or use
|
||||||
|
# os.environ["DJANGO_SETTINGS_MODULE"] = "haystack.settings"
|
||||||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "haystack.settings")
|
||||||
|
|
||||||
|
# This application object is used by any WSGI server configured to use this
|
||||||
|
# file. This includes Django's development server, if the WSGI_APPLICATION
|
||||||
|
# setting points here.
|
||||||
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
application = get_wsgi_application()
|
||||||
|
|
||||||
|
# Apply WSGI middleware here.
|
||||||
|
# from helloworld.wsgi import HelloWorldApplication
|
||||||
|
# application = HelloWorldApplication(application)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "haystack.settings")
|
||||||
|
|
||||||
|
from django.core.management import execute_from_command_line
|
||||||
|
|
||||||
|
execute_from_command_line(sys.argv)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
django==1.6
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
pylibmc
|
||||||
|
psycopg2
|
||||||
@@ -1 +1,2 @@
|
|||||||
httpbin
|
requests
|
||||||
|
distribute==0.6.49
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
requests==2.2.1
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
pypy-2.3
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
requests==2.2.1
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
python-2.7.6
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
requests==2.2.1
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
python-3.4.0
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env python2
|
||||||
|
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
DEFAULT_PATH = '{0}.zip'.format(os.path.abspath(__file__))
|
||||||
|
BPWATCH_DISTRO_PATH = os.environ.get('BPWATCH_DISTRO_PATH', DEFAULT_PATH)
|
||||||
|
|
||||||
|
sys.path.insert(0, BPWATCH_DISTRO_PATH)
|
||||||
|
|
||||||
|
import bp_cli
|
||||||
|
bp_cli.main()
|
||||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
-58
@@ -1,58 +0,0 @@
|
|||||||
Author
|
|
||||||
------
|
|
||||||
|
|
||||||
Ian Bicking
|
|
||||||
|
|
||||||
Maintainers
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Brian Rosner
|
|
||||||
Carl Meyer
|
|
||||||
Jannis Leidel
|
|
||||||
Paul Nasrat
|
|
||||||
|
|
||||||
Contributors
|
|
||||||
------------
|
|
||||||
|
|
||||||
Alex Grönholm
|
|
||||||
Anatoly Techtonik
|
|
||||||
Antonio Cuni
|
|
||||||
Armin Ronacher
|
|
||||||
Benjamin Root
|
|
||||||
Bradley Ayers
|
|
||||||
Branden Rolston
|
|
||||||
Cap Petschulat
|
|
||||||
CBWhiz
|
|
||||||
Chris McDonough
|
|
||||||
Christian Stefanescu
|
|
||||||
Christopher Nilsson
|
|
||||||
Cliff Xuan
|
|
||||||
Curt Micol
|
|
||||||
Damien Nozay
|
|
||||||
David Schoonover
|
|
||||||
Doug Hellmann
|
|
||||||
Doug Napoleone
|
|
||||||
Douglas Creager
|
|
||||||
Ethan Jucovy
|
|
||||||
Gabriel de Perthuis
|
|
||||||
Gunnlaugur Thor Briem
|
|
||||||
Greg Haskins
|
|
||||||
Jason R. Coombs
|
|
||||||
Jeff Hammel
|
|
||||||
Jeremy Orem
|
|
||||||
Jonathan Griffin
|
|
||||||
Jorge Vargas
|
|
||||||
Josh Bronson
|
|
||||||
Konstantin Zemlyak
|
|
||||||
Kumar McMillan
|
|
||||||
Lars Francke
|
|
||||||
Marc Abramowitz
|
|
||||||
Mike Hommey
|
|
||||||
Miki Tebeka
|
|
||||||
Paul Moore
|
|
||||||
Philip Jenvey
|
|
||||||
Raul Leal
|
|
||||||
Ronny Pfannschmidt
|
|
||||||
Stefano Rivera
|
|
||||||
Tarek Ziadé
|
|
||||||
Vinay Sajip
|
|
||||||
Vendored
-22
@@ -1,22 +0,0 @@
|
|||||||
Copyright (c) 2007 Ian Bicking and Contributors
|
|
||||||
Copyright (c) 2009 Ian Bicking, The Open Planning Project
|
|
||||||
Copyright (c) 2011-2012 The virtualenv developers
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
Vendored
-11
@@ -1,11 +0,0 @@
|
|||||||
recursive-include bin *
|
|
||||||
recursive-include docs *
|
|
||||||
recursive-include scripts *
|
|
||||||
recursive-include virtualenv_support *.egg *.tar.gz
|
|
||||||
recursive-include virtualenv_embedded *
|
|
||||||
recursive-exclude docs/_templates *
|
|
||||||
recursive-exclude docs/_build *
|
|
||||||
include virtualenv_support/__init__.py
|
|
||||||
include *.py
|
|
||||||
include AUTHORS.txt
|
|
||||||
include LICENSE.txt
|
|
||||||
Vendored
-1208
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user