Skip to content
Merged
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
8 changes: 8 additions & 0 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@

case $python::provider {
pip: {
# Install pip without pip, see https://pip.pypa.io/en/stable/installing/.
exec { 'bootstrap pip':
command => 'curl https://bootstrap.pypa.io/get-pip.py | python',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Downloading scripts from the internet and running them makes baby jesus cry. Can't we just install the packages?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is only done if you choose pip as a provider.

Generally I'd agree with you, but I couldn't think of a better way to do this whilst remaining cross-platform compatible.

creates => '/usr/local/bin/pip',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is probably not platform independent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you do it @joshuaspence :-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok

require => Package['python'],
}
Exec['bootstrap pip'] -> Package <| provider == pip |>

Package <| title == 'pip' |> {
name => 'pip',
provider => 'pip',
Expand Down