Skip to content

Instantly share code, notes, and snippets.

@ibizaman
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save ibizaman/e2e400ab9420e88364b3 to your computer and use it in GitHub Desktop.

Select an option

Save ibizaman/e2e400ab9420e88364b3 to your computer and use it in GitHub Desktop.

Use vagrant to develop baron and redbaron

Copy the files bootstrap.sh, Vagrantfile and test_baron.sh. In the same directory:

git clone https://github.com/Psycojoker/baron.git
git clone https://github.com/Psycojoker/redbaron.git

vagrant up

To test baron and redbaron:

vagrant ssh
cd /vagrant
./test_baron.sh
#!/usr/bin/env bash
apt-get update
# PYTHON
PYTHON_VERSIONS="2.6 2.7 3.2 3.3 3.4"
PYTHON_PACKAGES="rply pytest"
DOC_PYTHON_PACKAGES="ipython sphinx matplotlib"
DOC_PACKAGES="make inotify-tools libfreetype6-dev python2.7-dev g++ libpng12-dev"
apt-get -y install python-software-properties
add-apt-repository -y ppa:ubuntu-sdk-team/ppa
add-apt-repository -y ppa:fkrull/deadsnakes
apt-get update
wget http://python-distribute.org/distribute_setup.py
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
for v in $PYTHON_VERSIONS; do
py_bin=python$v
pip_bin=pip$v
apt-get -y install $py_bin
$py_bin distribute_setup.py
$py_bin get-pip.py
$pip_bin install $PYTHON_PACKAGES
done
apt-get -y install $DOC_PACKAGES
pip2.7 install $DOC_PYTHON_PACKAGES
PYTHON_VERSIONS="2.6 2.7 3.2 3.3 3.4"
for v in $PYTHON_VERSIONS; do
py.test-$v -q baron/tests
py.test-$v -q redbaron/tests
done
Vagrantfile 1,1 Tout baron/docs/index.rst 1,1 Tout
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "dev" do |ubuntu|
ubuntu.vm.box = "precise64"
ubuntu.vm.box_url = "http://files.vagrantup.com/precise64.box"
ubuntu.vm.network :private_network, ip: "192.168.44.11"
ubuntu.vm.provision :shell, :path => "bootstrap.sh", :args => "ubuntu"
end
config.ssh.forward_x11 = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment