Skip to content

Commit 796680d

Browse files
committed
require virtualenv to be ready before installing packages with pip
This should fix the first part of issue voxpupuli#430 "pip3 missing in the virtualenv ?" using a proxy for download is not addressed here
1 parent e54af62 commit 796680d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

manifests/pip.pp

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@
7373
$python_provider = getparam(Class['python'], 'provider')
7474
$python_version = getparam(Class['python'], 'version')
7575

76+
if $virtualenv != 'system' {
77+
Python::Pyvenv <| |> -> Python::Pip[$name]
78+
Python::Virtualenv <| |> -> Python::Pip[$name]
79+
}
80+
7681
# Get SCL exec prefix
7782
# NB: this will not work if you are running puppet from scl enabled shell
7883
$exec_prefix = $python_provider ? {

manifests/pyvenv.pp

-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
case $facts['os']['distro']['codename'] {
4848
'xenial','bionic','cosmic','disco',
4949
'jessie','stretch','buster': {
50-
notify {"python3_venv_package: $python3_venv_package":
51-
}
5250
package {$python3_venv_package:
5351
before => File[$venv_dir],
5452
}

0 commit comments

Comments
 (0)