File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Install packages using the new hotness in Python package management...[`pip`](ht
47
47
48
48
# Actions
49
49
50
- - :install: Install a pip package - if version is provided, install that specific version
50
+ - :install: Install a pip package - if version is provided, install that specific version (default)
51
51
- :upgrade: Upgrade a pip package - if version is provided, upgrade to that specific version
52
52
- :remove: Remove a pip package
53
53
- :user: User to run pip as, for using with virtualenv
@@ -65,26 +65,21 @@ Install packages using the new hotness in Python package management...[`pip`](ht
65
65
# Example
66
66
67
67
# install latest gunicorn into system path
68
- python_pip "gunicorn" do
69
- action :install
70
- end
68
+ python_pip "gunicorn"
71
69
72
70
# target a virtualenv
73
71
python_pip "gunicorn" do
74
72
virtualenv "/home/ubunut/my_ve"
75
- action :install
76
73
end
77
74
78
75
# install Django 1.1.4
79
76
python_pip "django" do
80
77
version "1.1.4"
81
- action :install
82
78
end
83
79
84
80
# use this provider with the core package resource
85
81
package "django" do
86
82
provider Chef::Provider::PythonPip
87
- action :install
88
83
end
89
84
90
85
` python_virtualenv `
Original file line number Diff line number Diff line change 19
19
#
20
20
21
21
actions :install , :upgrade , :remove , :purge
22
+ default_action :install
23
+
24
+ # Covers 0.10.8 and earlier :default_action
25
+ def initialize ( *args )
26
+ super
27
+ @action = :install
28
+ end
22
29
23
30
attribute :package_name , :kind_of => String , :name_attribute => true
24
31
attribute :version , :default => nil
You can’t perform that action at this time.
0 commit comments