6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/ventriloquist/cap/debian/python.rb', line 6
def self.pyenv_install(machine)
machine.communicate.tap do |comm|
if ! comm.test('test -d $HOME/.pyenv')
machine.env.ui.info('Installing pyenv dependencies')
comm.sudo('sudo apt-get install -y build-essential libreadline-dev libssl-dev libsqlite3-dev libbz2-dev')
machine.env.ui.info('Installing pyenv')
comm.execute <<-INSTALL
git clone git://github.com/yyuu/pyenv.git $HOME/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
echo 'eval "$(pyenv init -)"' >> ~/.profile
INSTALL
end
end
end
|