From b159224b379776d13f80d341eba380eeaad559a0 Mon Sep 17 00:00:00 2001 From: Spencer Ellinor Date: Thu, 18 Dec 2014 10:48:05 -0800 Subject: [PATCH 1/3] Ensure pip/setuptools are properly setup. --- recipes/pip.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/recipes/pip.rb b/recipes/pip.rb index 17110fa..5d8131b 100644 --- a/recipes/pip.rb +++ b/recipes/pip.rb @@ -47,6 +47,15 @@ not_if { ::File.exists?(pip_binary) } end +python_pip 'pip' do + action :upgrade +end + +python_pip 'setuptools' do + action :upgrade + version node['python']['setuptools_version'] +end + python_pip 'setuptools' do action :upgrade version node['python']['setuptools_version'] From a1d4b584d29c05cce7d26b4408289ef9ea55baf9 Mon Sep 17 00:00:00 2001 From: Spencer Ellinor Date: Thu, 18 Dec 2014 13:14:18 -0800 Subject: [PATCH 2/3] Once we update setuptools via pip, remove system package. --- recipes/pip.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/recipes/pip.rb b/recipes/pip.rb index 5d8131b..908c097 100644 --- a/recipes/pip.rb +++ b/recipes/pip.rb @@ -33,6 +33,8 @@ pip_binary = "/usr/local/bin/pip" end +Chef::Log.info "Pip binary: #{pip_binary}" + cookbook_file "#{Chef::Config[:file_cache_path]}/get-pip.py" do source 'get-pip.py' mode "0644" @@ -47,13 +49,12 @@ not_if { ::File.exists?(pip_binary) } end -python_pip 'pip' do - action :upgrade +package "python-setuptools" do + action :remove end -python_pip 'setuptools' do +python_pip 'pip' do action :upgrade - version node['python']['setuptools_version'] end python_pip 'setuptools' do From d1566c9148dd7276c05e31bae8f45379bc320ab4 Mon Sep 17 00:00:00 2001 From: Spencer Ellinor Date: Thu, 18 Dec 2014 17:29:32 -0800 Subject: [PATCH 3/3] Log Python binary --- recipes/pip.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/pip.rb b/recipes/pip.rb index 908c097..0312ae6 100644 --- a/recipes/pip.rb +++ b/recipes/pip.rb @@ -34,6 +34,7 @@ end Chef::Log.info "Pip binary: #{pip_binary}" +Chef::Log.info "Python binary: #{node['python']['binary']}" cookbook_file "#{Chef::Config[:file_cache_path]}/get-pip.py" do source 'get-pip.py'