diff --git a/bin/compile b/bin/compile index 0d012e48e4d47aef30c1bc182ff1a9aa4adb7ea6..0d11f3b1bb5651bf51c542c37bcbd33dcdd42285 100755 --- a/bin/compile +++ b/bin/compile @@ -85,6 +85,12 @@ cd $BUILD_DIR # # Just a little peace of mind. +# If no requirements given, assume `setup.py develop`. +if [ ! -f requirements.txt ]; then + puts-step "No requirements.txt provided; assuming dist package." + echo "-e ." > requirements.txt +fi + # Reject a Django app that appears to be packaged incorrectly. if [ "$NAME" = "Python" ]; then [ -f settings.py ] && { puts-warn "Django settings must be in a package subdirectory"; exit 1; } @@ -145,13 +151,6 @@ source $BIN_DIR/steps/pylibmc puts-step "Activating virtualenv" source bin/activate - -# If no requirements given, assume `setup.py develop`. -if [ ! -f requirements.txt ]; then - puts-step "No requirements.txt provided; assuming dist package." - echo "-e ." > requirements.txt -fi - # Install Mercurial if it appears to be required. if (grep -Fiq "hg+" requirements.txt) then pip install --use-mirrors mercurial | indent diff --git a/bin/steps/pylibmc b/bin/steps/pylibmc index 58dd3eeb75b07799a092bf8fdc213e157395e332..8bed8b85063ae6bb7d0267fa964e37ec5ae96c19 100644 --- a/bin/steps/pylibmc +++ b/bin/steps/pylibmc @@ -13,24 +13,23 @@ VENDORED_MEMCACHED="http://cl.ly/0a191R3K160t1w1P0N25/vendor-libmemcached.tar.gz" # If pylibmc exists within requirements, use vendored libmemcached. -if [ -f requirements.txt ]; then - if (grep -Fiq "pylibmc" requirements.txt) then - echo "-----> Noticed pylibmc. Bootstrapping libmemcached." - cd .heroku - - 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 - export LIBMEMCACHED=$(pwd)/vendor - fi +if (grep -Fiq "pylibmc" requirements.txt) then + echo "-----> Noticed pylibmc. Bootstrapping libmemcached." + cd .heroku + 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 export LIBMEMCACHED=$(pwd)/vendor - cd .. fi + + export LIBMEMCACHED=$(pwd)/vendor + cd .. fi +