Issue #7286 has been updated by Jeremy Bouse.
Yes, originally I looked at SMAC's branch but found that solution to be too rigid and version dependent as it worked with older versions of python-pip but would fail with newer versions that no longer had the environment CLI option. I'm working on another manner which should work with both older and newer versions alike. The 'virtualenv' parameter would be available to all package types so a consensus on what would be a good universal parameter name would be good, the actual implementation would then be left to the specific provider. I'm unsure if the parameter itself shouldn't be setup under a feature which could be specified based on provider as well. I had intentions to attempt implementing something similar to the puppetlabs-inifile provider and establish a format similar to what the puppetlabs-java_ks module uses of "alias:path" where it used "package:virtualenv" or simply "package" if installed on the system without a virtualenv (provided that's even a use case?). I think that if the pip provider can get to properly handling installing packages in multiple virtual environments successfully that the handling of requirements could be left to the module to wrap around the package resources. Another possible option would possibly be to make use of the install_options or extending the type to also include 'requirements' as parameter or possibly extend the adminfile or some other existing parameter that is not currently used by the pip provider so as to limit the number of additional parameters being added. ---------------------------------------- Feature #7286: Add virtualenv support to the pip package provider https://projects.puppetlabs.com/issues/7286#change-100308 * Author: Jonathan Stoppani * Status: Needs Decision * Priority: Normal * Assignee: Jason Antman * Category: provider * Target version: * Affected Puppet version: * Keywords: pip virtualenv python package * Branch: https://github.com/SMAC/puppet/tree/feature/master/7286 ---------------------------------------- Now that #6527 is merged into master, it is possible to easily add support for virtualenvs and fully complete #3572. A `virtualenv` argument could be added to the `package` type in order to instrument `pip` to install the requested package into the given virtualenv directory. For example: package { "my-python-package": ensure => latest, provider => pip, virtualenv => "/path/to/virtualenv } The content of the virtualenv parameter will be passed directly to the `--environment` parameter of the `pip install` command Some references: * [http://pypi.python.org/pypi/pip](http://pypi.python.org/pypi/pip) * [http://www.pip-installer.org/en/latest/index.html#using-pip-with-virtualenv](http://www.pip-installer.org/en/latest/index.html#using-pip-with-virtualenv) * [https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/pip.rb](https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/pip.rb) -- 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.
