Skip to content

Commit 250c7ad

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 3d102f4 commit 250c7ad

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
@@ -71,6 +71,11 @@
7171
$python_provider = getparam(Class['python'], 'provider')
7272
$python_version = getparam(Class['python'], 'version')
7373

74+
if $virtualenv != 'system' {
75+
Python::Pyvenv <| |> -> Python::Pip[$name]
76+
Python::Virtualenv <| |> -> Python::Pip[$name]
77+
}
78+
7479
# Get SCL exec prefix
7580
# NB: this will not work if you are running puppet from scl enabled shell
7681
$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)