diff --git a/libraries/provider_ark.rb b/libraries/provider_ark.rb index a31b5e0..fa9f80b 100644 --- a/libraries/provider_ark.rb +++ b/libraries/provider_ark.rb @@ -109,16 +109,36 @@ def action_install_with_make end end - # needs a test, start here http://guide.python-distribute.org/quickstart.html - def action_setup_py + + #TODO needs a test, start here http://guide.python-distribute.org/quickstart.html + def action_setup_py_build unless new_resource.creates and ::File.exists? new_resource.creates - b = Chef::Resource::Script::Bash.new("setup.py", run_context) + set_paths + action_download + action_unpack + b = Chef::Resource::Script::Bash.new("setup.py build", run_context) + b.cwd new_resource.path + b.environment new_resource.environment + b.code "python setup.py build" + b.run_action(:run) + end + end + + #TODO needs a test, start here http://guide.python-distribute.org/quickstart.html + def action_setup_py_install + unless new_resource.creates and ::File.exists? new_resource.creates + set_paths + action_download + action_unpack + b = Chef::Resource::Script::Bash.new("setup.py install", run_context) b.cwd new_resource.path b.environment new_resource.environment b.code "python setup.py install" b.run_action(:run) end end + + alias action_setup_py action_setup_py_install def action_link_paths l = Chef::Resource::Link.new(new_resource.home_dir, run_context) diff --git a/libraries/resource_ark.rb b/libraries/resource_ark.rb index 5aaf47c..ddb390e 100644 --- a/libraries/resource_ark.rb +++ b/libraries/resource_ark.rb @@ -27,7 +27,7 @@ class Ark < Chef::Resource def initialize(name, run_context=nil) super @resource_name = :ark - @allowed_actions.push(:install, :dump, :cherry_pick, :put, :install_with_make, :configure, :setup_py) + @allowed_actions.push(:install, :dump, :cherry_pick, :put, :install_with_make, :configure, :setup_py_build, :setup_py_install, :setup_py) @action = :install @provider = Chef::Provider::Ark end diff --git a/metadata.rb b/metadata.rb index c3f0c60..514bc2d 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ license "Apache 2.0" description "Installs/Configures ark" long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "0.0.13" +version "0.0.14" %w{ debian ubuntu centos redhat fedora }.each do |os| supports os