Skip to content

Commit 33bc6e2

Browse files
author
Joshua Timberman
committed
Merge pull request poise#24 from wohali/master
COOK-1925: Support SmartOS for Python
2 parents b78e82b + 29ce987 commit 33bc6e2

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

attributes/default.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
default['python']['install_method'] = 'package'
2222

2323
if python['install_method'] == 'package'
24-
default['python']['prefix_dir'] = '/usr'
24+
case platform
25+
when "smartos"
26+
default['python']['prefix_dir'] = '/opt/local'
27+
else
28+
default['python']['prefix_dir'] = '/usr'
29+
end
2530
else
2631
default['python']['prefix_dir'] = '/usr/local'
2732
end

metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
recipe "python::pip", "Installs pip from source."
1515
recipe "python::virtualenv", "Installs virtualenv using the python_pip resource."
1616

17-
%w{ debian ubuntu centos redhat fedora freebsd }.each do |os|
17+
%w{ debian ubuntu centos redhat fedora freebsd smartos }.each do |os|
1818
supports os
1919
end

recipes/package.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"debian" => ["python","python-dev"],
3232
"rhel" => ["python","python-devel"],
3333
"freebsd" => ["python"],
34+
"smartos" => ["python27"],
3435
"default" => ["python","python-dev"]
3536
)
3637
end

recipes/pip.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
if platform_family?("rhel")
2222
pip_binary = "/usr/bin/pip"
23+
elsif platform_family?("smartos")
24+
pip_binary = "/opt/local/bin/pip"
2325
else
2426
pip_binary = "/usr/local/bin/pip"
2527
end

0 commit comments

Comments
 (0)