diff --git a/providers/django.rb b/providers/django.rb index bf66e59..cf5bbdc 100644 --- a/providers/django.rb +++ b/providers/django.rb @@ -58,7 +58,8 @@ if new_resource.requirements Chef::Log.info("Installing using requirements file: #{new_resource.requirements}") pip_cmd = ::File.join(new_resource.virtualenv, 'bin', 'pip') - execute "#{pip_cmd} install --source=#{Dir.tmpdir} -r #{new_resource.requirements}" do + pip_arguments = new_resource.pip_arguments.is_a?(String) ? new_resource.pip_arguments : "" + execute "#{pip_cmd} install --source=#{Dir.tmpdir} -r #{new_resource.requirements} #{pip_arguments}" do cwd new_resource.release_path # seems that if we don't set the HOME env var pip tries to log to /root/.pip, which fails due to permissions # setting HOME also enables us to control pip behavior on per-project basis by dropping off a pip.conf file there diff --git a/resources/django.rb b/resources/django.rb index 7282df5..d9e4f2e 100644 --- a/resources/django.rb +++ b/resources/django.rb @@ -30,6 +30,7 @@ attribute :local_settings_file, :kind_of => String, :default => 'local_settings.py' attribute :debug, :kind_of => [TrueClass, FalseClass], :default => false attribute :collectstatic, :kind_of => [TrueClass, FalseClass, String], :default => false +attribute :pip_arguments, :kind_of => [NilClass, String], :default => nil def local_settings_base local_settings_file.split(/[\\\/]/).last