Skip to content

Commit

Permalink
Use pyenv.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Lecocq committed Sep 6, 2016
1 parent ec9757a commit c7d7909
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,3 +7,4 @@
.vagrant/
build/*
driver
venv/
1 change: 1 addition & 0 deletions .python-version
@@ -0,0 +1 @@
2.7.11
44 changes: 38 additions & 6 deletions provision.sh
@@ -1,11 +1,43 @@
#! /usr/bin/env bash

# Some dependencies
set -e

sudo apt-get update
sudo apt-get install -y libjudy-dev make g++ gdb git python-dev python-pip
sudo pip install cython==0.22.1
sudo apt-get install -y tar curl git

# 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

pushd /vagrant

(
cd /vagrant/
# Submodules
git submodule update --init --recursive
)

# 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

0 comments on commit c7d7909

Please sign in to comment.