Issue #18029 has been updated by eric sorenson.

Status changed from Unreviewed to Needs More Information
Assignee set to R. Arruda

Renato - Thanks for the patch! There has been some increasing interest in the 
Pip provider lately, and some of the issues overlap with the one you're trying 
to solve. I've linked up the other tickets in the 'related issues' box above. 

The main thing I'd like to see in order to get this patch incorporated in 
puppet is the thing described in #7286 -- that ticket also has a use for the 
install_options hash but passes them to the installer command directly, not as 
arguments to `--install-options=`.

Secondarily the Windows providers recently moved to using an array of hashes as 
the install_options argument and joining them in the provider when necessary. I 
don't know that this is necessarily better, but it allows single-command flags 
as well as `--argument=value` type options in a little bit nicer way, you'd end 
up with something like

<pre>
  package {'carbon':
    ensure   => installed,
    provider => 'pip',
    require  => Package['python-twisted'],
    install_options => [ {'--install-option' => '--prefix=/home/user/graphite' 
}, 
                                   {'--install-option' => 
'--install-lib=/home/user/graphite/libs'}
                                   {'-e' => '/path/to/virtualenv'],
                                   '-q'
                                 ]
  }
</pre>

Does that make sense? If you'd like to rework your patch to implement this, 
it'd be much more likely to get incorporated as it solves a bunch of people's 
problems.

A couple of administrative details:
1. Please sign the Contributor License Agreement using the link on the 
http://projects.puppetlabs.com/ header menu bar so we can accept the 
contribution
2. Submit the change as a github pull request following the [CONTRIBUTING 
guide](https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md)

Thank you for contributing to Puppet!!
----------------------------------------
Feature #18029: Install Options for PIP package provider (incl. patch)
https://projects.puppetlabs.com/issues/18029#change-84053

Author: R. Arruda
Status: Needs More Information
Priority: Normal
Assignee: R. Arruda
Category: package
Target version: 
Affected Puppet version: 3.0.1
Keywords: improvement pip
Branch: 


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 puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to