diff --git a/builds/README.md b/builds/README.md index 819e8af..48aa5e9 100644 --- a/builds/README.md +++ b/builds/README.md @@ -1,3 +1,28 @@ # 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= + $ heroku config:set AWS_SECRET_ACCESS_KEY= + $ heroku config:set S3_BUCKET= + + +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... + + +Enjoy :) \ No newline at end of file diff --git a/builds/runtimes/python-2.7.6 b/builds/runtimes/python-2.7.6 index f39832f..f9040a7 100755 --- a/builds/runtimes/python-2.7.6 +++ b/builds/runtimes/python-2.7.6 @@ -13,6 +13,3 @@ cd src ./configure --prefix=$OUT_PREFIX make make install - -cd .. -rm -fr src diff --git a/builds/runtimes/python-3.4.0 b/builds/runtimes/python-3.4.0 new file mode 100755 index 0000000..7df02e5 --- /dev/null +++ b/builds/runtimes/python-3.4.0 @@ -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 +make +make install + +ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python diff --git a/requirements.txt b/requirements.txt index 3050b50..ce30b8f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -bob-builder==0.0.2 \ No newline at end of file +bob-builder==0.0.4 \ No newline at end of file