Commit 33138912 authored by Kenneth Reitz's avatar Kenneth Reitz

move setup.py stuff up

parent 1e914b85
...@@ -85,6 +85,12 @@ cd $BUILD_DIR ...@@ -85,6 +85,12 @@ cd $BUILD_DIR
# #
# Just a little peace of mind. # 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. # Reject a Django app that appears to be packaged incorrectly.
if [ "$NAME" = "Python" ]; then if [ "$NAME" = "Python" ]; then
[ -f settings.py ] && { puts-warn "Django settings must be in a package subdirectory"; exit 1; } [ -f settings.py ] && { puts-warn "Django settings must be in a package subdirectory"; exit 1; }
...@@ -145,13 +151,6 @@ source $BIN_DIR/steps/pylibmc ...@@ -145,13 +151,6 @@ source $BIN_DIR/steps/pylibmc
puts-step "Activating virtualenv" puts-step "Activating virtualenv"
source bin/activate 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. # Install Mercurial if it appears to be required.
if (grep -Fiq "hg+" requirements.txt) then if (grep -Fiq "hg+" requirements.txt) then
pip install --use-mirrors mercurial | indent pip install --use-mirrors mercurial | indent
......
...@@ -13,24 +13,23 @@ ...@@ -13,24 +13,23 @@
VENDORED_MEMCACHED="http://cl.ly/0a191R3K160t1w1P0N25/vendor-libmemcached.tar.gz" VENDORED_MEMCACHED="http://cl.ly/0a191R3K160t1w1P0N25/vendor-libmemcached.tar.gz"
# If pylibmc exists within requirements, use vendored libmemcached. # If pylibmc exists within requirements, use vendored libmemcached.
if [ -f requirements.txt ]; then if (grep -Fiq "pylibmc" requirements.txt) then
if (grep -Fiq "pylibmc" requirements.txt) then echo "-----> Noticed pylibmc. Bootstrapping libmemcached."
echo "-----> Noticed pylibmc. Bootstrapping libmemcached." cd .heroku
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 [ -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 export LIBMEMCACHED=$(pwd)/vendor
cd ..
fi fi
export LIBMEMCACHED=$(pwd)/vendor
cd ..
fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment