Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid the pip/setuptools problem.
Current pip and old Debian setuptools don't play well together.
  • Loading branch information
Duncan Parkes committed Jan 8, 2014
1 parent 790f993 commit ec7a3b9
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions conf/post_deploy_actions.bash
Expand Up @@ -16,16 +16,23 @@ virtualenv_args=""
if [ "$(echo -e '1.7\n'$virtualenv_version | sort -V | head -1)" = '1.7' ]; then if [ "$(echo -e '1.7\n'$virtualenv_version | sort -V | head -1)" = '1.7' ]; then
virtualenv_args="--system-site-packages" virtualenv_args="--system-site-packages"
fi fi
virtualenv $virtualenv_args ../virtualenv-mapit
source ../virtualenv-mapit/bin/activate


# Upgrade pip to a secure version virtualenv_dir='../virtualenv-mapit'
if [ -f /data/mysociety/bin/get-pip.py ]; then virtualenv_activate="$virtualenv_dir/bin/activate"
python /data/mysociety/bin/get-pip.py
else if [ ! -f "$virtualenv_activate" ]
curl -s https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python then
virtualenv $virtualenv_args $virtualenv_dir
fi fi


source $virtualenv_activate

# Upgrade pip to a secure version
# curl -s https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
# Revert to the line above once we can get a newer setuptools from Debian, or
# pip ceases to need such a recent one.
curl -s https://raw.github.com/mysociety/commonlib/master/bin/get_pip.bash | bash

# Install all the packages # Install all the packages
pip install -r requirements.txt pip install -r requirements.txt


Expand Down

0 comments on commit ec7a3b9

Please sign in to comment.