Showing with 12 additions and 1 deletion.
  1. +1 −1 Modulefile
  2. +3 −0 README.md
  3. +8 −0 manifests/pip.pp
2 changes: 1 addition & 1 deletion Modulefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name 'stankevich-python'
version '1.7.4'
version '1.7.5'

author 'Sergey Stankevich'
license 'Apache License, Version 2.0'
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,16 @@ Installs and manages packages from pip.

**uninstall_args** - Array of additional flags to pass to pip during uninstall. Default: none

**timeout** - Timeout for the pip install command. Defaults to 1800.

python::pip { 'cx_Oracle':
pkgname => 'cx_Oracle',
virtualenv => '/var/www/project1',
owner => 'appuser',
proxy => 'http://proxy.domain.com:3128',
environment => 'ORACLE_HOME=/usr/lib/oracle/11.2/client64',
install_args => ['-e'],
timeout => 1800,
}

### python::requirements
Expand Down
8 changes: 8 additions & 0 deletions manifests/pip.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
# [*environment*]
# Additional environment variables required to install the packages. Default: none
#
# [*timeout*]
# The maximum time in seconds the "pip install" command should take. Default: 1800
#
# [*install_args*]
# String. Any additional installation arguments that will be supplied
# when running pip install.
Expand Down Expand Up @@ -63,6 +66,7 @@
$environment = [],
$install_args = '',
$uninstall_args = '',
$timeout = 1800,
) {

# Parameter validation
Expand Down Expand Up @@ -150,6 +154,7 @@
user => $owner,
environment => $environment,
path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],
timeout => $timeout,
}
}

Expand All @@ -161,6 +166,7 @@
user => $owner,
environment => $environment,
path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],
timeout => $timeout,
}
}

Expand All @@ -172,6 +178,7 @@
user => $owner,
environment => $environment,
path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],
timeout => $timeout,
}
}

Expand All @@ -183,6 +190,7 @@
user => $owner,
environment => $environment,
path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],
timeout => $timeout,
}
}
}
Expand Down