From 92155f9af72596ebca64962be6c7718b976526db Mon Sep 17 00:00:00 2001 From: jhsubscribe Date: Thu, 2 Jan 2014 16:14:16 +0000 Subject: [PATCH 1/3] added in change of binary if altinstall sourced from tjcravey --- attributes/default.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/attributes/default.rb b/attributes/default.rb index 85c96eb..41ada6b 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -31,7 +31,12 @@ default['python']['prefix_dir'] = '/usr/local' end -default['python']['binary'] = "#{node['python']['prefix_dir']}/bin/python" +# default['python']['binary'] = "#{node['python']['prefix_dir']}/bin/python" +if python['make_options'] == %W{install} + default['python']['binary'] = "#{node['python']['prefix_dir']}/bin/python#{python['version'].split(/(^\d+\.\d+)/)[1]}" + else + default['python']['binary'] = "#{node['python']['prefix_dir']}/bin/python" +end default['python']['url'] = 'http://www.python.org/ftp/python' default['python']['version'] = '2.7.5' From a1d6b2b1bff15ac9c60537795ee711b1309c7e59 Mon Sep 17 00:00:00 2001 From: jhsubscribe Date: Thu, 2 Jan 2014 16:17:46 +0000 Subject: [PATCH 2/3] yum3 update --- recipes/package.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/package.rb b/recipes/package.rb index aed5214..115b53b 100644 --- a/recipes/package.rb +++ b/recipes/package.rb @@ -23,7 +23,7 @@ # COOK-1016 Handle RHEL/CentOS namings of python packages, by installing EPEL # repo & package if platform_family?('rhel') && major_version < 6 - include_recipe 'yum::epel' + include_recipe 'yum-epel' python_pkgs = ["python26", "python26-devel"] node.default['python']['binary'] = "/usr/bin/python26" else From 99d4765c5b917136345fc21dad2216d494e376b3 Mon Sep 17 00:00:00 2001 From: jhsubscribe Date: Thu, 2 Jan 2014 17:26:09 +0000 Subject: [PATCH 3/3] altinstall as default avoiding merge issues --- attributes/default.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/attributes/default.rb b/attributes/default.rb index 41ada6b..99f1bb8 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -42,7 +42,8 @@ default['python']['version'] = '2.7.5' default['python']['checksum'] = '3b477554864e616a041ee4d7cef9849751770bc7c39adaf78a94ea145c488059' default['python']['configure_options'] = %W{--prefix=#{python['prefix_dir']}} -default['python']['make_options'] = %W{install} +# changing default to altinstall (as merging otherwise) +default['python']['make_options'] = %W{altinstall} default['python']['pip_location'] = "#{node['python']['prefix_dir']}/bin/pip" default['python']['virtualenv_location'] = "#{node['python']['prefix_dir']}/bin/virtualenv"