Skip to content

Bug virtualenv instead of virtualenv-$version#261

Merged
shivapoudel merged 1 commit into
masterfrom
unknown repository
Nov 18, 2015
Merged

Bug virtualenv instead of virtualenv-$version#261
shivapoudel merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Nov 18, 2015

Hello,

Thank you for your useful Puppet module!

This pull request solves an error caused by the class "python::virtualenv", when the parameter "version" is changed (if you put something else than "system" in the parameter "version", "virtualenv-$version" is used instead of "virtualenv").

The error:

    Error: sh: 1: virtualenv-2: not found
    sh: 1: /opt/pyenv2/bin/pip: not found
    sh: 1: /opt/pyenv2/bin/pip: not found
    Error: /Stage[main]/Profiles::Python/Python::Virtualenv[pyenv2]/Exec[python_virtualenv_/opt/pyenv2]/returns: change from notrun to 0 failed: sh: 1: virtualenv-2: not found
    sh: 1: /opt/pyenv2/bin/pip: not found
    sh: 1: /opt/pyenv2/bin/pip: not found

My operating system: Ubuntu Wily

My Puppet code:

  python::virtualenv { 'pyenv2' :
    ensure       => present,
    version      => '2',
    venv_dir     => '/opt/pyenv2',
    cwd          => '/opt/pyenv2',
    timeout      => 0,
  }

Best regards,

Asher256

shivapoudel pushed a commit that referenced this pull request Nov 18, 2015
Bug virtualenv instead of virtualenv-$version
@shivapoudel shivapoudel merged commit acebd44 into voxpupuli:master Nov 18, 2015
@dansajner
Copy link
Copy Markdown

@shivapoudel @ghoneycutt I'm a bit unhappy with this change. Obviously it was an issue for @Asher256 but the virtualenv parameter is available to specify the executable name.

The previous implementation was correct for my (any probably other's) use case where the executable name is indeed virtualenv-$version. To accept this change all of our python::virtualenv declarations will need updated to pass along the virtualenv parameter including other upstream modules (namely https://github.com/evenup/evenup-beaver/blob/master/manifests/package.pp#L38-L44).

Would you consider reverting this patch in favor of not breaking the existing functionality for others? Otherwise please consider this a breaking change in your next release. Thanks!

@ghost
Copy link
Copy Markdown
Author

ghost commented May 28, 2016

An alternative solution dansajner would be to add an argument the users can use to specify the virtualenv executable name (or path).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants