Issue #18029 has been updated by Jason Antman.

Renato, are you "just" installing the packages in a non-standard location? It 
seems to me that this really should be closed in favor of #7286 (which has 
mostly the same end-result).

In your example, is /home/user/graphite a python virtualenv?

The canonical way to handle this in the Python world is by creating a virtual 
environment and installing the packages there, using the `pip` that's part of 
the virtualenv. So long as pip in general is idempotent (which this provider 
is), it really just boils down to passing the provider the path to a 
virtualenv, and using the pip and python *in that venv*, not system-wide.

----------------------------------------
Feature #18029: Install Options for PIP package provider (incl. patch)
https://projects.puppetlabs.com/issues/18029#change-99674

* Author: R. Arruda
* Status: Code Insufficient
* Priority: Normal
* Assignee: eric sorenson
* Category: package
* Target version: 
* Affected Puppet version: 3.0.1
* Keywords: improvement pip
* Branch: https://github.com/puppetlabs/puppet/pull/1507
----------------------------------------
Hey,

Due to some special requirements in my environment i need support for custom 
install options in PIP (and the PIP provider).

I wrote a small patch to the pip package provider to support the feature i 
needed (custom install options sent to pip).

Here is an example of what I needed:
<pre>
  package {'carbon':
    ensure   => installed,
    provider => 'pip',
    require  => Package['python-twisted'],
    install_options => ['--prefix=/home/user/graphite', 
'--install-lib=/home/user/graphite/libs'],
  }
</pre>
So I extended the package provider locally to support such syntax. And I'd like 
to get it integrated upstream. I've tested and it works well for me here, using 
debian6.

Here is the patch: (same patch in unified format is included as an attached 
file)
<pre>
12c12
<   has_feature :installable, :uninstallable, :upgradeable, :versionable
---
>   has_feature :installable, :uninstallable, :upgradeable, :versionable, 
> :install_options
81a82,86
>       end
>     end
>     if @resource[:install_options]
>       @resource[:install_options].each do |install_option|
>         args << "--install-option="+install_option
</pre>
If this doesnt follow puppet's style or guidelines, feel free to point me to 
them. :)

-Renato


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to