Skip to content

Commit 5617ad2

Browse files
committed
Added environment attribute to the pip class which allows for users to override environment variables like LD_LIBRARY_PATH and ORACLE_HOME which are needed to install packages like cx_Oracle.
1 parent 3c606c9 commit 5617ad2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

manifests/pip.pp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
$url = false,
3434
$owner = 'root',
3535
$group = 'root',
36-
$proxy = false
36+
$proxy = false,
37+
environment = []
3738
) {
3839

3940
# Parameter validation
@@ -62,6 +63,7 @@
6263
command => "${virtualenv}/bin/pip install ${proxy_flag} ${source}",
6364
unless => "${virtualenv}/bin/pip freeze | grep -i -e ${grep_regex}",
6465
user => $owner,
66+
environment => $environment,
6567
}
6668
}
6769

@@ -70,6 +72,7 @@
7072
command => "echo y | ${virtualenv}/bin/pip uninstall ${proxy_flag} ${name}",
7173
onlyif => "${virtualenv}/bin/pip freeze | grep -i -e ${grep_regex}",
7274
user => $owner,
75+
environment => $environment,
7376
}
7477
}
7578
}

0 commit comments

Comments
 (0)