From 72ce42e168ba92b9ed43ab0c28610bdeebd17297 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sun, 19 Feb 2017 19:58:17 -0800 Subject: [PATCH] Vagrantfile: xenial64 and install all Pythons --- Vagrantfile | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 71b9af4..4047951 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,21 +2,24 @@ # vi: set ft=ruby : Vagrant.configure("2") do |config| - config.vm.box = "bento/ubuntu-16.04" + config.vm.box = "ubuntu/xenial64" config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" config.vm.provision "shell", inline: <<-SHELL export DEBIAN_FRONTEND=noninteractive + sudo add-apt-repository -y ppa:fkrull/deadsnakes + sudo add-apt-repository ppa:pypy/ppa apt-get update - apt-get install -y docker.io virtualenv - usermod --append --groups docker vagrant - mkdir -p /home/vagrant/.virtualenvs - if [ ! -d /home/vagrant/.virtualenvs/requests-unixsocket ]; then - virtualenv /home/vagrant/.virtualenvs/requests-unixsocket - /home/vagrant/.virtualenvs/requests-unixsocket/bin/pip install -e /vagrant + apt-get install -y docker.io jq python2.6-dev python2.7-dev python3.3-dev python3.4-dev python3.5-dev python3.6-dev pypy-dev virtualenv + usermod --append --groups docker ubuntu + mkdir -p /home/ubuntu/.virtualenvs + if [ ! -d /home/ubuntu/.virtualenvs/requests-unixsocket ]; then + virtualenv --python=python3.6 /home/ubuntu/.virtualenvs/requests-unixsocket + /home/ubuntu/.virtualenvs/requests-unixsocket/bin/pip install -e /vagrant ipython tox fi - grep -q 'source /home/vagrant/.virtualenvs/requests-unixsocket/bin/activate' /home/vagrant/.profile \ - || echo -e '\nsource /home/vagrant/.virtualenvs/requests-unixsocket/bin/activate' >> /home/vagrant/.profile - grep -q 'cd /vagrant' /home/vagrant/.profile \ - || echo -e '\ncd /vagrant' >> /home/vagrant/.profile + chown -R ubuntu:ubuntu /home/ubuntu/.virtualenvs + grep -q 'source /home/ubuntu/.virtualenvs/requests-unixsocket/bin/activate' /home/ubuntu/.profile \ + || echo -e '\nsource /home/ubuntu/.virtualenvs/requests-unixsocket/bin/activate' >> /home/ubuntu/.profile + grep -q 'cd /vagrant' /home/ubuntu/.profile \ + || echo -e '\ncd /vagrant' >> /home/ubuntu/.profile SHELL end