Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked frompoise/python

Commitd565498

Browse files
committed
Added 'options' for virtualenv command.
Sometimes it is desirable to pass command line options to virtualenv(such as --system-site-packages), so I added an 'options' to the virtualenvresources (the same way as the pip command)
1 parentbb17707 commitd565498

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎providers/virtualenv.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
action:createdo
2626
unlessexists?
2727
Chef::Log.info("Creating virtualenv#{@new_resource} at#{@new_resource.path}")
28-
execute"#{virtualenv_cmd} --python=#{@new_resource.interpreter}#{@new_resource.path}"do
28+
execute"#{virtualenv_cmd} --python=#{@new_resource.interpreter}#{@new_resource.options}#{@new_resource.path}"do
2929
usernew_resource.ownerifnew_resource.owner
3030
groupnew_resource.groupifnew_resource.group
3131
end

‎resources/virtualenv.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@
2424
attribute:interpreter,:default=>'python2.6'
2525
attribute:owner,:regex=>Chef::Config[:user_valid_regex]
2626
attribute:group,:regex=>Chef::Config[:group_valid_regex]
27+
attribute:options,:kind_of=>String

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp