diff --git a/attributes/default.rb b/attributes/default.rb index 85c96eb..99f1bb8 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -31,13 +31,19 @@ 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' 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" 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