Skip to content

Commit

Permalink
pyenv
Browse files Browse the repository at this point in the history
  • Loading branch information
hgreebe committed Apr 18, 2024
1 parent 4574a4b commit f3ab74c
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions cookbooks/aws-parallelcluster-shared/resources/install_pyenv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,12 @@
# recursive true
# end

pyenv_tarball = "#{node['cluster']['base_dir']}/pyenv.tar.gz"
pyenv_url = "https://test-aws-parallelcluster.s3.amazonaws.com/archives/pyenv/pyenv.tar.gz"

remote_file pyenv_tarball do
source pyenv_url
mode '0644'
retries 3
retry_delay 5
action :create_if_missing
end

bash 'extract pyenv from archive' do
user 'root'
group 'root'
cwd "#{node['cluster']['base_dir']}"
code <<-UNTAR
#{cookbook_virtualenv_path}/bin/aws s3 cp s3://test-aws-parallelcluster/archives/pyenv/pyenv.tar.gz pyenv.tar.gz
set -e
tar xf #{pyenv_tarball}
UNTAR
Expand All @@ -62,12 +52,12 @@
# end
end

pyenv_python python_version do
user new_resource.user if new_resource.user_only
end

pyenv_plugin 'virtualenv' do
git_url 'https://github.com/pyenv/pyenv-virtualenv'
user new_resource.user if new_resource.user_only
end
# pyenv_python python_version do
# user new_resource.user if new_resource.user_only
# end
#
# pyenv_plugin 'virtualenv' do
# git_url 'https://github.com/pyenv/pyenv-virtualenv'
# user new_resource.user if new_resource.user_only
# end
end

0 comments on commit f3ab74c

Please sign in to comment.