Skip to content
Browse files

Avoid the pip/setuptools problem.

Current pip and old Debian setuptools don't play well together.
  • Loading branch information...
1 parent 790f993 commit ec7a3b974b239db0d1845a0eaf9a9705e1063c84 Duncan Parkes committed Jan 8, 2014
Showing with 14 additions and 7 deletions.
  1. +14 −7 conf/post_deploy_actions.bash
View
21 conf/post_deploy_actions.bash
@@ -16,16 +16,23 @@ virtualenv_args=""
if [ "$(echo -e '1.7\n'$virtualenv_version | sort -V | head -1)" = '1.7' ]; then
virtualenv_args="--system-site-packages"
fi
-virtualenv $virtualenv_args ../virtualenv-mapit
-source ../virtualenv-mapit/bin/activate
-# Upgrade pip to a secure version
-if [ -f /data/mysociety/bin/get-pip.py ]; then
- python /data/mysociety/bin/get-pip.py
-else
- curl -s https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
+virtualenv_dir='../virtualenv-mapit'
+virtualenv_activate="$virtualenv_dir/bin/activate"
+
+if [ ! -f "$virtualenv_activate" ]
+then
+ virtualenv $virtualenv_args $virtualenv_dir
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
pip install -r requirements.txt

0 comments on commit ec7a3b9

Please sign in to comment.
Something went wrong with that request. Please try again.