Skip to content

Commit

Permalink
COOK-1925: Support SmartOS for python
Browse files Browse the repository at this point in the history
  • Loading branch information
wohali committed Nov 20, 2012
1 parent c6c891b commit 29ce987
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
default['python']['install_method'] = 'package'

if python['install_method'] == 'package'
default['python']['prefix_dir'] = '/usr'
case platform
when "smartos"
default['python']['prefix_dir'] = '/opt/local'
else
default['python']['prefix_dir'] = '/usr'
end
else
default['python']['prefix_dir'] = '/usr/local'
end
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
recipe "python::pip", "Installs pip from source."
recipe "python::virtualenv", "Installs virtualenv using the python_pip resource."

%w{ debian ubuntu centos redhat fedora freebsd }.each do |os|
%w{ debian ubuntu centos redhat fedora freebsd smartos }.each do |os|
supports os
end
1 change: 1 addition & 0 deletions recipes/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"debian" => ["python","python-dev"],
"rhel" => ["python","python-devel"],
"freebsd" => ["python"],
"smartos" => ["python27"],
"default" => ["python","python-dev"]
)
end
Expand Down
2 changes: 2 additions & 0 deletions recipes/pip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

if platform_family?("rhel")
pip_binary = "/usr/bin/pip"
elsif platform_family?("smartos")
pip_binary = "/opt/local/bin/pip"
else
pip_binary = "/usr/local/bin/pip"
end
Expand Down

0 comments on commit 29ce987

Please sign in to comment.