Permalink
Browse files

Merge branch 'COOK-650'

  • Loading branch information...
2 parents 67dd0f0 + b40e01d commit d1c047f44a222f4acb7746a3097b87187eff06a6 @jtimberman jtimberman committed Jan 19, 2012
Showing with 11 additions and 4 deletions.
  1. +5 −2 python/README.md
  2. +2 −0 python/attributes/default.rb
  3. +3 −1 python/recipes/pip.rb
  4. +1 −1 python/recipes/source.rb
View
@@ -20,9 +20,12 @@ Cookbooks
Attributes
==========
-* `node["python"]["install_method"]` = method to install python with, default `package`.
+See `attributes/default.rb` for default values.
-The file also contains the following attribute types:
+* `node["python"]["install_method"]` - method to install python with, default `package`.
+* `node["python"]["distribute_install_py_version"]` - version of python to use when installing distribute. default '', specify version like '2.6' (uses python2.6 binary).
+
+The file also contains the following attributes:
* platform specific locations and settings.
* source installation settings
@@ -18,6 +18,8 @@
# limitations under the License.
#
+default['python']['distribute_install_py_version'] = ''
+
default['python']['install_method'] = 'package'
default['python']['url'] = 'http://www.python.org/ftp/python'
View
@@ -28,10 +28,12 @@
not_if "which pip"
end
+use_version = node['python']['distribute_install_py_version']
+
bash "install-pip" do
cwd Chef::Config[:file_cache_path]
code <<-EOF
- python distribute_setup.py
+ python#{use_version} distribute_setup.py
easy_install pip
EOF
not_if "which pip"
View
@@ -32,7 +32,7 @@
end
version = node['python']['version']
-install_path = "#{node['python']['prefix_dir']}/lib/python#{version.split(/(^\d+\.\d+)/)}"
+install_path = "#{node['python']['prefix_dir']}/lib/python#{version.split(/(^\d+\.\d+)/)[1]}"
remote_file "#{Chef::Config[:file_cache_path]}/Python-#{version}.tar.bz2" do
source "#{node['python']['url']}/#{version}/Python-#{version}.tar.bz2"

0 comments on commit d1c047f

Please sign in to comment.