From 5ffe9203d3f4d2184ba73544c86d947e1561a070 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 6 Mar 2012 04:20:00 -0500 Subject: [PATCH 1/2] check for setup.py too --- bin/detect | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/detect b/bin/detect index 034e4c8..1d7041c 100755 --- a/bin/detect +++ b/bin/detect @@ -2,7 +2,10 @@ # bin/detect BUILD_DIR=$1 -[ -f $BUILD_DIR/requirements.txt ] || exit 1 # fail fast if no requirements.txt + +if [ -f $BUILD_DIR/requirements.txt ] || [ -f $BUILD_DIR/setup.py ]; then + exit 1 +fi # 'Python/Django' if there is a [mysite]/settings.py file present; otherwise 'Python' -ls $BUILD_DIR/**/settings.py &> /dev/null && echo Python/Django || echo Python \ No newline at end of file +ls $BUILD_DIR/**/settings.py &> /dev/null && echo Python/Django || echo Python From 4be3d87e045eb0c0fdaee09e3d53e15fd22ae58f Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 6 Mar 2012 04:24:54 -0500 Subject: [PATCH 2/2] If no requirements, assume 'setup.py install' --- bin/compile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/compile b/bin/compile index d80c77b..6fc6174 100755 --- a/bin/compile +++ b/bin/compile @@ -81,6 +81,12 @@ source $BIN_DIR/steps/pylibmc echo "-----> Activating virtualenv" source bin/activate + +# If no requirements, assume 'setup.py install' +if [ ! -f requirements.txt ]; then + echo "." > requirements.txt +fi + # Install mercurial, if needed. if (grep -Fiq "hg+" requirements.txt) then pip install --use-mirrors mercurial | indent