Skip to content

Instantly share code, notes, and snippets.

@timconradinc
Last active August 29, 2015 14:25
Show Gist options
  • Save timconradinc/55eecbb525ae5cc3ff8d to your computer and use it in GitHub Desktop.
Save timconradinc/55eecbb525ae5cc3ff8d to your computer and use it in GitHub Desktop.
# shell script for setting up environment
# assuming you're using virtualenv and pip, of course ;-)
# this is safe to run multiple times if you update requirements.txt
# (though if you want the env rebuilt, you'll need to remove it)
BASE=$(dirname $0)
ENV=$BASE/.python
test ! -d $ENV && virtualenv --distribute --no-site-packages $ENV
# celery wants python-dateutil 1.5 and not 2.0
source ${ENV}/bin/activate
pip install -Iv "http://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-1.5.tar.gz#md5=0dcb1de5e5cad69490a3b6ab63f0cfa5"
# kombu has a ssl bug that we need version from git
pip install -r $BASE/requirements.txt
cd tmp && git clone https://github.com/ask/kombu && cd kombu && python setup.py install
echo "== Bootstrap finished, use source ${ENV}/bin/activate to get started"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment