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

python::pip - empty pkgname is silently ignored #67

Closed
giavac opened this issue Mar 7, 2014 · 2 comments
Closed

python::pip - empty pkgname is silently ignored #67

giavac opened this issue Mar 7, 2014 · 2 comments

Comments

@giavac
Copy link
Contributor

giavac commented Mar 7, 2014

Trying this module out for the first time I wanted to use the simplest definition possible to install a module with pip.
So I used:
python::pip { 'requests':
ensure => latest,
}
The catalog compiled without complaining, but the result wasn't as expected.
Then I noticed that "pip install --upgrade" was in fact executed, but with empty package name, e.g.:

debug: Executing 'pip wheel --help > /dev/null 2>&1 && { pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; pip --log //pip.log install --upgrade $wheel_support_flag '

So I realized the right way to do it was:
python::pip { 'requests':
pkgname => 'requests',
ensure => latest,
}
which works.

Shouldn't $pkgname be evaluated and forced to be a string? e.g. with something like stdlib::validate_string()?
Thanks.

@swpecht
Copy link
Contributor

swpecht commented Jun 19, 2014

I'm a little confused by your issue.

"pkgname" defaults to "name". See: https://github.com/stankevich/puppet-python/blob/master/manifests/pip.pp

So:

python::pip { 'requests':
    ensure => latest,
}

Should be equivalent to:

python::pip { 'requests':
    pkgname => 'requests',
    ensure => latest,
}

Does this clarify things at all?

@shivapoudel
Copy link
Contributor

@swpecht is right they both are equivalent.

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

No branches or pull requests

3 participants