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

Fix for issue #303 #444

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,12 @@
}
}

if "${::python::version}" =~ /^python3/ { #lint:ignore:only_variable_string
if "${python::version}" =~ /^python3/ and ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '7') >= 0) { #lint:ignore:only_variable_string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not work with just:
if $python::version, which would fix the lint error and also avoid needing to ignore the lint error?

$pip_category = undef
$pip_package = 'python3-pip'
$pip_package = 'python34-pip'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn’t this break later versions of python 3?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danquack, possibly - but given this module doesn't work at all with CentOS, this PR is intended as a step towards bridging the gap. I'd suggest that if the repo maintainers move to a different naming convention, we would adapt the install manifest to reflect that - and possibly be more inclusive of other available python/pip combinations.

There's currently no pip available for higher versions of python from repos, as far as I can tell, and using the python34 one with python36 (manually) seems to work OK.

} elsif "${python::version}" =~ /^python3/ { #lint:ignore:only_variable_string
$pip_category = undef
$pip_package = '1'
} elsif ($::osfamily == 'RedHat') and (versioncmp($::operatingsystemmajrelease, '7') >= 0) {
$pip_category = undef
$pip_package = 'python2-pip'
Expand Down