diff --git a/recipes/source.rb b/recipes/source.rb index eb8288d..140bb2f 100644 --- a/recipes/source.rb +++ b/recipes/source.rb @@ -34,6 +34,12 @@ version = node['python']['version'] install_path = "#{node['python']['prefix_dir']}/bin/python#{version.split(/(^\d+\.\d+)/)[1]}" +directory "#{Chef::Config[:file_cache_path]}" do + recursive true + action :create + not_if { ::File.exists?("#{Chef::Config[:file_cache_path]}") } +end + remote_file "#{Chef::Config[:file_cache_path]}/Python-#{version}.tar.bz2" do source "#{node['python']['url']}/#{version}/Python-#{version}.tar.bz2" checksum node['python']['checksum']