mirror of https://github.com/borgbackup/borg.git
vagrant: add py3.4 for precise/trusty, install pyinstaller
also: source .profile so the PATH is ok
This commit is contained in:
parent
4410f1c3c3
commit
9dc98eeb45
|
@ -11,6 +11,7 @@
|
||||||
# - have all dependencies installed
|
# - have all dependencies installed
|
||||||
# - have a working "virtualenv" command
|
# - have a working "virtualenv" command
|
||||||
# - have a working "python3" command
|
# - have a working "python3" command
|
||||||
|
# - have a working "python3.4" command on platforms where we build a binary
|
||||||
#
|
#
|
||||||
# packages_prepare_OS goals: (for some older OS)
|
# packages_prepare_OS goals: (for some older OS)
|
||||||
# - adds additional package sources, so packages_OS can find all it needs.
|
# - adds additional package sources, so packages_OS can find all it needs.
|
||||||
|
@ -18,6 +19,8 @@
|
||||||
# prepare_user goals:
|
# prepare_user goals:
|
||||||
# - have a working "borg-env" virtual env installed, with code from "borg".
|
# - have a working "borg-env" virtual env installed, with code from "borg".
|
||||||
# both directories are in /vagrant/borg/.
|
# both directories are in /vagrant/borg/.
|
||||||
|
# - have a working "borg-env34" virtual env installed, with code from "borg"
|
||||||
|
# and pyinstaller.
|
||||||
|
|
||||||
def packages_prepare_wheezy
|
def packages_prepare_wheezy
|
||||||
return <<-EOF
|
return <<-EOF
|
||||||
|
@ -30,6 +33,15 @@ def packages_prepare_precise
|
||||||
return <<-EOF
|
return <<-EOF
|
||||||
# ubuntu 12.04 precise does not have lz4, but it is available from a ppa:
|
# ubuntu 12.04 precise does not have lz4, but it is available from a ppa:
|
||||||
add-apt-repository -y ppa:gezakovacs/lz4
|
add-apt-repository -y ppa:gezakovacs/lz4
|
||||||
|
# we build the 32bit binary here also, using pyinstaller and py3.4.
|
||||||
|
add-apt-repository -y ppa:fkrull/deadsnakes
|
||||||
|
EOF
|
||||||
|
end
|
||||||
|
|
||||||
|
def packages_prepare_trusty
|
||||||
|
return <<-EOF
|
||||||
|
# we build the 64bit binary here also, using pyinstaller and py3.4.
|
||||||
|
add-apt-repository -y ppa:fkrull/deadsnakes
|
||||||
EOF
|
EOF
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -52,7 +64,9 @@ end
|
||||||
def packages_debianoid
|
def packages_debianoid
|
||||||
return <<-EOF
|
return <<-EOF
|
||||||
apt-get update
|
apt-get update
|
||||||
|
apt-get install -y python-dev # pyinstaller needs py2
|
||||||
apt-get install -y python3-dev python3-setuptools
|
apt-get install -y python3-dev python3-setuptools
|
||||||
|
apt-get install -y python3.4-dev # for pyinstaller / binary building
|
||||||
apt-get install -y libssl-dev libacl1-dev liblz4-dev
|
apt-get install -y libssl-dev libacl1-dev liblz4-dev
|
||||||
apt-get install -y libfuse-dev fuse pkg-config
|
apt-get install -y libfuse-dev fuse pkg-config
|
||||||
apt-get install -y fakeroot build-essential git
|
apt-get install -y fakeroot build-essential git
|
||||||
|
@ -170,16 +184,26 @@ def prepare_user(boxname)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /vagrant/borg
|
cd /vagrant/borg
|
||||||
#python -m virtualenv --python=python3 borg-env
|
# this is the env with the STANDARD python3.x on this platform
|
||||||
virtualenv --python=python3 borg-env
|
virtualenv --python=python3 borg-env
|
||||||
. borg-env/bin/activate
|
. borg-env/bin/activate
|
||||||
|
|
||||||
cd borg
|
cd borg
|
||||||
# pip install -U pip setuptools # we fetch a current virtualenv, so these are fresh also
|
|
||||||
pip install 'llfuse<0.41' # 0.41 does not install due to UnicodeDecodeError
|
pip install 'llfuse<0.41' # 0.41 does not install due to UnicodeDecodeError
|
||||||
pip install -r requirements.d/development.txt
|
pip install -r requirements.d/development.txt
|
||||||
pip install -e .
|
pip install -e .
|
||||||
|
|
||||||
|
# on some platforms, we build a borg binary (and use py3.4 for it)
|
||||||
|
if which python3.4 > /dev/null; then
|
||||||
|
cd /vagrant/borg
|
||||||
|
virtualenv --python=python3.4 borg-env34
|
||||||
|
. borg-env34/bin/activate
|
||||||
|
cd borg
|
||||||
|
pip install 'PyInstaller==3.0.dev2'
|
||||||
|
pip install 'llfuse<0.41' # 0.41 does not install due to UnicodeDecodeError
|
||||||
|
pip install -r requirements.d/development.txt
|
||||||
|
pip install -e .
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Run:"
|
echo "Run:"
|
||||||
echo " vagrant rsync #{boxname}"
|
echo " vagrant rsync #{boxname}"
|
||||||
|
@ -189,6 +213,7 @@ end
|
||||||
|
|
||||||
def fix_perms
|
def fix_perms
|
||||||
return <<-EOF
|
return <<-EOF
|
||||||
|
. ~/.profile
|
||||||
chown -R vagrant /vagrant/borg
|
chown -R vagrant /vagrant/borg
|
||||||
EOF
|
EOF
|
||||||
end
|
end
|
||||||
|
@ -215,6 +240,7 @@ Vagrant.configure(2) do |config|
|
||||||
|
|
||||||
config.vm.define "trusty64" do |b|
|
config.vm.define "trusty64" do |b|
|
||||||
b.vm.box = "ubuntu/trusty64"
|
b.vm.box = "ubuntu/trusty64"
|
||||||
|
b.vm.provision "packages prepare trusty", :type => :shell, :inline => packages_prepare_trusty
|
||||||
b.vm.provision "packages debianoid", :type => :shell, :inline => packages_debianoid
|
b.vm.provision "packages debianoid", :type => :shell, :inline => packages_debianoid
|
||||||
b.vm.provision "prepare user", :type => :shell, :privileged => false, :inline => prepare_user("trusty64")
|
b.vm.provision "prepare user", :type => :shell, :privileged => false, :inline => prepare_user("trusty64")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue