forked from seomoz/qless-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision.sh
45 lines (35 loc) · 1.01 KB
/
provision.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /usr/bin/env bash
set -e
# Some dependencies
sudo apt-get update
sudo apt-get install -y git libhiredis-dev libevent-dev python-pip python-dev
# Install redis in support of reqless
sudo apt-get install -y redis-server
# Libraries required to build a complete python with pyenv:
# https://github.com/yyuu/pyenv/wiki
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev
# Install pyenv
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
echo '
# Pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
' >> ~/.bash_profile
source ~/.bash_profile
hash
# Install dependencies and the thing itself
pushd /vagrant
# Install our python version
pyenv install
pyenv rehash
# Install a virtualenv
pip install virtualenv
if [ ! -d venv ]; then
virtualenv venv
fi
source venv/bin/activate
# Lastly, our dependencies
pip install -r requirements.txt
popd