Hi,
I'm currently in the process of writing my first puppet script and I've hit a a problem with the pip package provider. It seems like the puppet pip provider is looking for executable by the name of 'pip' but under Centos 6, the executable goes by the name 'pip-python'. While I can probably hack a workaround in, I'm curious if there is a preferred method of doing this? Should I try and extend the pip provider, create something akin to an alias or do something else entirely?
I'm using the Puppet 3.0.1 release and Centos 6.3 for what it's worth.
Thanks for any advice
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/pip.rbthis is pip's source file.in the end, you can see thisprivatedef lazy_pip(*args)pip *argsrescue NoMethodError => eif pathname = which('pip')self.class.commands :pip => pathnamepip *argselseraise e, 'Could not locate the pip command.'endendother functions call lazy_pip to install or uninstall packages.and lazy_pip use which to find where is the 'pip' command.
在 2012年12月14日星期五UTC+8下午4时12分02秒,Joshua Vote写道: