Skip to content
Snippets Groups Projects
Commit 1aad2138 authored by Kenneth Reitz's avatar Kenneth Reitz
Browse files

update pip if it is out of date

parent 686ee087
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,8 @@ PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
# Python version. This will be used in the future to specify custom Pythons.
DEFAULT_PYTHON_VERSION="python-2.7.3"
PYTHON_EXE="/app/.heroku/python/bin/python"
PIP_VERSION="1.3.1"
DISTRIBUTE_VERSION="0.6.35"
# Sanitizing environment variables.
unset GIT_DIR PYTHONHOME PYTHONPATH LD_LIBRARY_PATH LIBRARY_PATH
......@@ -124,20 +126,23 @@ if [ ! "$SKIP_INSTALL" ]; then
echo $PYTHON_VERSION > .heroku/python-version
WORKING_DIR=$(pwd)
hash -r
else
puts-step "Using Python runtime ($PYTHON_VERSION)"
fi
# If Pip isn't up to date:
if [[ ! $(pip --version) == *$PIP_VERSION* ]]; then
# Prepare it for the real world
puts-step "Installing Distribute (0.6.35)"
cd $ROOT_DIR/vendor/distribute-0.6.35/
puts-step "Installing Distribute ($DISTRIBUTE_VERSION)"
cd $ROOT_DIR/vendor/distribute-$DISTRIBUTE_VERSION/
python setup.py install &> /dev/null
cd $WORKING_DIR
puts-step "Installing Pip (1.3.1)"
cd $ROOT_DIR/vendor/pip-1.3.1/
puts-step "Installing Pip ($PIP_VERSION)"
cd $ROOT_DIR/vendor/pip-$PIP_VERSION/
python setup.py install &> /dev/null
cd $WORKING_DIR
hash -r
else
puts-step "Using Python runtime ($PYTHON_VERSION)"
fi
set -e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment