move setup.py stuff up

This commit is contained in:
Kenneth Reitz
2012-03-23 22:46:29 -04:00
parent 1e914b8558
commit 3313891205
2 changed files with 20 additions and 22 deletions
+6 -7
View File
@@ -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
+14 -15
View File
@@ -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