File tree Expand file tree Collapse file tree 3 files changed +46
-13
lines changed Expand file tree Collapse file tree 3 files changed +46
-13
lines changed Original file line number Diff line number Diff line change 1010
1111* [ ` python ` ] ( #python ) : Installs and manages python, python-dev and gunicorn.
1212* [ ` python::install::dev ` ] ( #python--install--dev ) : Installs python development packages
13+ * [ ` python::install::pip ` ] ( #python--install--pip ) : Installs python pip packages
1314* [ ` python::install::venv ` ] ( #python--install--venv ) : Installs python virtualenv packages
1415* [ ` python::pip::bootstrap ` ] ( #python--pip--bootstrap ) : allow to bootstrap pip when python is managed from other module
1516
@@ -295,6 +296,10 @@ Default value: `'/opt/python'`
295296
296297Installs python development packages
297298
299+ ### <a name =" python--install--pip " ></a >` python::install::pip `
300+
301+ Installs python pip packages
302+
298303### <a name =" python--install--venv " ></a >` python::install::venv `
299304
300305Installs python virtualenv packages
Original file line number Diff line number Diff line change 3838 case $python::provider {
3939 ' pip' : {
4040 if $python::manage_pip_package {
41- package { 'pip' :
42- ensure => $python::pip ,
43- require => Package[' python' ],
44- }
41+ include python::install::pip
4542 }
4643
4744 if $python::manage_dev_package and $pythondev {
159156 }
160157 } else {
161158 if $python::manage_pip_package {
162- package { 'python-pip' :
163- ensure => $python::pip ,
164- require => Package[' python' ],
165- provider => ' yum' ,
166- }
159+ include python::install::pip
167160 }
168161 }
169162
173166 }
174167 default: {
175168 if $python::manage_pip_package {
176- package { 'pip' :
177- ensure => $python::pip ,
178- require => Package[' python' ],
179- }
169+ include python::install::pip
180170 }
181171
182172 if $python::manage_dev_package and $pythondev {
Original file line number Diff line number Diff line change 1+ # @summary Installs python pip packages
2+ class python::install::pip {
3+ include python
4+
5+ case $python::provider {
6+ ' pip' : {
7+ package { 'pip' :
8+ ensure => $python::pip ,
9+ require => Package[' python' ],
10+ }
11+ }
12+ ' scl' : {
13+ }
14+ ' rhscl' : {
15+ }
16+ ' anaconda' : {
17+ }
18+ default: {
19+ case $facts [' os' ][' family' ] {
20+ ' AIX' : {
21+ unless String($python::version ) =~ /^python3/ {
22+ package { 'python-pip' :
23+ ensure => $python::pip ,
24+ require => Package[' python' ],
25+ provider => ' yum' ,
26+ }
27+ }
28+ }
29+ default: {
30+ package { 'pip' :
31+ ensure => $python::pip ,
32+ require => Package[' python' ],
33+ }
34+ }
35+ }
36+ }
37+ }
38+ }
You can’t perform that action at this time.
0 commit comments