Skip to content

Commit

Permalink
require virtualenv to be ready before installing packages with pip
Browse files Browse the repository at this point in the history
This should fix the first part of issue #430 "pip3 missing in the virtualenv ?"

using a proxy for download is not addressed here
  • Loading branch information
jradmacher committed Jan 2, 2019
1 parent e54af62 commit 796680d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions manifests/pip.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
$python_provider = getparam(Class['python'], 'provider')
$python_version = getparam(Class['python'], 'version')

if $virtualenv != 'system' {
Python::Pyvenv <| |> -> Python::Pip[$name]
Python::Virtualenv <| |> -> Python::Pip[$name]
}

# Get SCL exec prefix
# NB: this will not work if you are running puppet from scl enabled shell
$exec_prefix = $python_provider ? {
Expand Down
2 changes: 0 additions & 2 deletions manifests/pyvenv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
case $facts['os']['distro']['codename'] {
'xenial','bionic','cosmic','disco',
'jessie','stretch','buster': {
notify {"python3_venv_package: $python3_venv_package":
}
package {$python3_venv_package:
before => File[$venv_dir],
}
Expand Down

0 comments on commit 796680d

Please sign in to comment.