From 5617ad20f4515254d9ac7b9cdef63de59ebece08 Mon Sep 17 00:00:00 2001 From: Fotis Gimian Date: Mon, 3 Jun 2013 19:43:14 +1000 Subject: 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. --- manifests/pip.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'manifests/pip.pp') diff --git a/manifests/pip.pp b/manifests/pip.pp index b40b916..73f4cdc 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -33,7 +33,8 @@ define python::pip ( $url = false, $owner = 'root', $group = 'root', - $proxy = false + $proxy = false, + environment = [] ) { # Parameter validation @@ -62,6 +63,7 @@ define python::pip ( command => "${virtualenv}/bin/pip install ${proxy_flag} ${source}", unless => "${virtualenv}/bin/pip freeze | grep -i -e ${grep_regex}", user => $owner, + environment => $environment, } } @@ -70,6 +72,7 @@ define python::pip ( command => "echo y | ${virtualenv}/bin/pip uninstall ${proxy_flag} ${name}", onlyif => "${virtualenv}/bin/pip freeze | grep -i -e ${grep_regex}", user => $owner, + environment => $environment, } } } -- cgit v1.2.3