system-config/modules/pip/manifests/params.pp
Dan Prince 0bdc3b0cf4 Update pip module to support Red Hat distros.
Adds a new pip::params module where we set parameters based on
the operating system.

Updates the pip::init module so that it makes use of distro specific
parameters.

Also, includes a change to pip::init so that a soft link is
created for /usr/bin/pip (pointing to /usr/bin/pip-python). This
is required in order for the Puppet pip provider to work on Red Hat
distributions. Seems like we should push a fix into Puppet for this
as well but having this live here for now seems reasonable.

Change-Id: Ifee6bc42fabcf65ee1241ffac38f3bead7335be1
Reviewed-on: https://review.openstack.org/18904
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-01-17 18:24:16 +00:00

20 lines
533 B
Puppet

# Class: pip::params
#
# This class holds parameters that need to be
# accessed by other classes.
class pip::params {
case $::osfamily {
'Fedora', 'Redhat': {
$python_devel_package = 'python-devel'
$python_pip_package = 'python-pip'
}
'Debian', 'Ubuntu': {
$python_devel_package = 'python-all-dev'
$python_pip_package = 'python-pip'
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'pip' module only supports osfamily Fedora, Redhat, Debian, or Ubuntu.")
}
}
}