puppet-pip/manifests/params.pp
Paul Belanger 35a83454f2
Add pip3 support
We are wanting to start running python3 applications in production, as
a results we need to ensure that pip3 is created.

Because get-pip.py will override existing pip executables, it will be
possible for an existing server to have is version change to python3.
As a result, symlink specifically to pip2 to ensure we have defaulted
properly to python3.

Drop Babel from acceptance testing, this appears to be a failure that
needs to be looked at in the future.

Change-Id: I8f78dfc62cd3745e900eec573e80236137ac5c78
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-31 14:39:00 -04:00

38 lines
1.2 KiB
Puppet

# Class: pip::params
#
# This class holds parameters that need to be
# accessed by other classes.
class pip::params {
$get_pip_location = 'https://bootstrap.pypa.io/get-pip.py'
case $::osfamily {
'RedHat': {
$python_devel_package = 'python-devel'
$python3_devel_package = 'python3-devel'
$python3_pip_package = 'python3-pip'
$get_pip_path = '/bin/pip'
$get_pip2_path = '/bin/pip2'
$get_pip3_path = '/bin/pip3'
}
'Suse': {
$python_devel_package = 'python-devel'
$python3_devel_package = 'python3-devel'
$python3_pip_package = 'python3-pip'
$get_pip_path = '/usr/bin/pip'
$get_pip2_path = '/usr/bin/pip2'
$get_pip3_path = '/usr/bin/pip3'
}
'Debian': {
$python_devel_package = 'python-all-dev'
$python3_devel_package = 'python3-all-dev'
$python3_pip_package = 'python3-pip'
$get_pip_path = '/usr/local/bin/pip'
$get_pip2_path = '/usr/local/bin/pip2'
$get_pip3_path = '/usr/local/bin/pip3'
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'pip' module only supports osfamily Debian, RedHat or SUSE.")
}
}
}