voxpupuli / puppet-python

Puppet module for installing and managing Python, pip, virtualenvs and Gunicorn virtual hosts.
https://forge.puppetlabs.com/puppet/python
Apache License 2.0
199 stars 375 forks source link

Allow the use of pip3.4 and pip3.6 #476

Closed jsfrerot closed 5 years ago

jsfrerot commented 5 years ago

Centos 7 doesn't install pip3 anymore, but pip3.4 or pip3.6

diff --git a/modules/python/manifests/pip.pp b/modules/python/manifests/pip.pp
index e7aa6efe2..3c8f241b9 100644
--- a/modules/python/manifests/pip.pp
+++ b/modules/python/manifests/pip.pp
@@ -75,7 +75,7 @@ define python::pip (
   $pkgname                             = $name,
   $ensure                              = present,
   $virtualenv                          = 'system',
-  Enum['pip', 'pip3'] $pip_provider    = 'pip',
+  Enum['pip','pip3','pip3.4','pip3.6'] $pip_provider    = 'pip',
   $url                                 = false,
   $owner                               = 'root',
   $group                               = 'root',
pillarsdotnet commented 5 years ago

Probably be better to have a regex, like:

Pattern[/\Apip([2-3](\.\d)?)?\z] $pip_provider = 'pip',
pillarsdotnet commented 5 years ago

I see that the current version has String[1] which will certainly allow the requested values.

@jsfrerot, would you please close this issue?