Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug virtualenv instead of virtualenv-$version #261

Merged
merged 1 commit into from Nov 18, 2015
Merged

Bug virtualenv instead of virtualenv-$version #261

merged 1 commit into from Nov 18, 2015

Conversation

ghost
Copy link

@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

@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
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