mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
update pip if it is out of date
This commit is contained in:
+16
-11
@@ -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,22 +126,25 @@ if [ ! "$SKIP_INSTALL" ]; then
|
||||
echo $PYTHON_VERSION > .heroku/python-version
|
||||
WORKING_DIR=$(pwd)
|
||||
|
||||
# Prepare it for the real world
|
||||
puts-step "Installing Distribute (0.6.35)"
|
||||
cd $ROOT_DIR/vendor/distribute-0.6.35/
|
||||
python setup.py install &> /dev/null
|
||||
cd $WORKING_DIR
|
||||
|
||||
puts-step "Installing Pip (1.3.1)"
|
||||
cd $ROOT_DIR/vendor/pip-1.3.1/
|
||||
python setup.py install &> /dev/null
|
||||
cd $WORKING_DIR
|
||||
|
||||
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 ($DISTRIBUTE_VERSION)"
|
||||
cd $ROOT_DIR/vendor/distribute-$DISTRIBUTE_VERSION/
|
||||
python setup.py install &> /dev/null
|
||||
cd $WORKING_DIR
|
||||
|
||||
puts-step "Installing Pip ($PIP_VERSION)"
|
||||
cd $ROOT_DIR/vendor/pip-$PIP_VERSION/
|
||||
python setup.py install &> /dev/null
|
||||
cd $WORKING_DIR
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
# Pylibmc support.
|
||||
|
||||
Reference in New Issue
Block a user