From 91015bd2c1ce178b7b3722a9b7a52e862c9bc4a9 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 23 Mar 2012 16:31:32 -0400 Subject: [PATCH] pylibmc --- Makefile | 1 + bin/steps/pylibmc | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5cff5ae..3d8cc26 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ 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 'Pylibmc Buildpack Compiler' ./bin/steps/pylibmc > site/pylibmc.html site: docs cd site && git add -A && git commit -m 'update' && git push heroku master diff --git a/bin/steps/pylibmc b/bin/steps/pylibmc index 1b3be5c..7ca9b9c 100644 --- a/bin/steps/pylibmc +++ b/bin/steps/pylibmc @@ -1,8 +1,18 @@ #!/usr/bin/env bash +# This script serves as the Pylibmc 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`](/). + +# The location of the pre-compiled libmemcached binary. VENDORED_MEMCACHED="http://cl.ly/0a191R3K160t1w1P0N25/vendor-libmemcached.tar.gz" -# if pylibmc within requirements, use vendored libmemcached +# If pylibmc exists within requirements, use vendored libmemcached. if (grep -Fiq "pylibmc" requirements.txt) then echo "-----> Noticed pylibmc. Bootstrapping libmemcached." @@ -11,6 +21,7 @@ then if [ -d "vendor/lib/sasl2" ]; then export LIBMEMCACHED=$(pwd)/vendor else + # Download and extract libmemcached into target vendor directory. curl -s -L -o tmp-libmemcached.tar.gz $VENDORED_MEMCACHED tar -zxvf tmp-libmemcached.tar.gz > /dev/null rm tmp-libmemcached.tar.gz