From 631aa4b356b40a287f6b4ed7786a9da36fc54f48 Mon Sep 17 00:00:00 2001 From: cclauss Date: Tue, 17 Jun 2014 20:09:25 +0200 Subject: [PATCH 1/2] Readme: Update Python versions to match compile Also matches recent updates to https://devcenter.heroku.com/articles/python-runtimes --- Readme.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Readme.md b/Readme.md index 6033548..a2b9a72 100644 --- a/Readme.md +++ b/Readme.md @@ -17,8 +17,8 @@ Example usage: $ git push heroku master ... -----> Python app detected - -----> No runtime.txt provided; assuming python-2.7.6. - -----> Preparing Python runtime (python-2.7.6) + -----> No runtime.txt provided; assuming python-2.7.7. + -----> Preparing Python runtime (python-2.7.7) -----> Installing Setuptools (3.6) -----> Installing Pip (1.5.6) -----> Installing dependencies using Pip (1.5.6) @@ -43,12 +43,12 @@ Specify a Runtime You can also provide arbitrary releases Python with a `runtime.txt` file. $ cat runtime.txt - python-3.4.0 + python-3.4.1 Runtime options include: -- python-2.7.6 -- python-3.4.0 +- python-2.7.7 +- python-3.4.1 - pypy-1.9 (experimental) -Other [unsupported runtimes](https://github.com/kennethreitz/python-versions/tree/master/formula) are available as well. +Other [unsupported runtimes](https://github.com/heroku/heroku-buildpack-python/tree/master/builds/runtimes) are available as well. From 826193ef5a17d06134a0085b143b07b2bca1de5e Mon Sep 17 00:00:00 2001 From: Hugo Rodger-Brown Date: Wed, 18 Jun 2014 18:09:25 +0100 Subject: [PATCH 2/2] Update pylibmc to support nested requirements. The current regex assumes that pylibmc appears at the beginning of a line (whitespace only precedes it), which is a fair assumption in a single 'flat' requirements.txt file. However, if you are using nested requirements then this is not the case - your pylibmc may exist in a sub-directory. This is very similar to the way in which mercurial is installed if "hg+" is found in the requirements file (see the /bin/compile script). By insisting that pylibmc appear at the beginning of the file, it's impossible to fool the compilation into installing libmemcached (as this script does) by simply putting the phrase into a comment, which is what you *can* do with 'hg+'. I've updated the regex to remove the beginning of line restriction. This means that you can add a comment to a top-level requirements.txt that will trigger the install, without having to functionally alter your nested requirements. e.g. top-level requirements.txt: # fake comment to trigger pylibmc script # fake comment to trigger hg+ install -r requirements/production.txt --- bin/steps/pylibmc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/steps/pylibmc b/bin/steps/pylibmc index 4f0c233..b6c0225 100755 --- a/bin/steps/pylibmc +++ b/bin/steps/pylibmc @@ -16,7 +16,7 @@ VENDORED_MEMCACHED="http://cl.ly/0a191R3K160t1w1P0N25/vendor-libmemcached.tar.gz source $BIN_DIR/utils # If pylibmc exists within requirements, use vendored libmemcached. -if (grep -Eiq "^\s*pylibmc" requirements.txt) then +if (grep -Eiq "\s*pylibmc" requirements.txt) then echo "-----> Noticed pylibmc. Bootstrapping libmemcached." cd .heroku