summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFotis Gimian <fgimiansoftware@gmail.com>2013-06-04 10:20:38 +1000
committerFotis Gimian <fgimiansoftware@gmail.com>2013-06-04 10:20:46 +1000
commit17debdc04506a2bfd4297b7620acffdbd01c9176 (patch)
tree6c8706436ae3d9c7c1e8c1210288dec3d3ecd414
parent01bf2791ecadfbb954b947fefa8b15ca0c0b9947 (diff)
Made the pip package independent from the dev package in the python class and updated version to 1.1.1
-rw-r--r--Modulefile2
-rw-r--r--README.md9
-rw-r--r--manifests/init.pp5
-rw-r--r--manifests/install.pp8
4 files changed, 19 insertions, 5 deletions
diff --git a/Modulefile b/Modulefile
index e132e99..fc13920 100644
--- a/Modulefile
+++ b/Modulefile
@@ -1,5 +1,5 @@
name 'puppet-python'
-version '1.1.0'
+version '1.1.1'
author 'Sergey Stankevich'
license 'Apache License, Version 2.0'
diff --git a/README.md b/README.md
index 1108ba0..d072b76 100644
--- a/README.md
+++ b/README.md
@@ -3,15 +3,16 @@
Puppet module for installing and managing python, pip, virtualenvs and Gunicorn virtual hosts.
-**Version 1.1.0 Notes**
+**Version 1.1.1 Notes**
-Version 1.1.0 makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general.
+Version 1.1.1 makes several fundamental changes to the core of this module, adding some additional features, improving performance and making operations more robust in general.
-Please note that everal changes have been made in v1.1.0 which make manifests incompatible with the previous version. However, modifying your manifests to suit is trivial. Please see the notes below.
+Please note that everal changes have been made in v1.1.1 which make manifests incompatible with the previous version. However, modifying your manifests to suit is trivial. Please see the notes below.
Currently, the changes you need to make are as follows:
* All pip definitions MUST include the owner field which specifies which user owns the virtualenv that packages will be installed in. Adding this greatly improves performance and efficiency of this module.
+* You must explicitly specify pip => true in the python class if you want pip installed. As such, the pip package is now independent of the dev package and so one can exist without the other.
## Installation
@@ -28,6 +29,8 @@ Installs and manages python, python-dev, python-virtualenv and Gunicorn.
**version** - Python version to install. Default: system default
+**pip** - Install python-pip. Default: false
+
**dev** - Install python-dev. Default: false
**virtualenv** - Install python-virtualenv. Default: false
diff --git a/manifests/init.pp b/manifests/init.pp
index 8e8de9e..2a9a44c 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -7,6 +7,9 @@
# [*version*]
# Python version to install. Default: system default
#
+# [*pip*]
+# Install python-pip. Default: false
+#
# [*dev*]
# Install python-dev. Default: false
#
@@ -20,6 +23,7 @@
#
# class { 'python':
# version => 'system',
+# pip => true,
# dev => true,
# virtualenv => true,
# gunicorn => true,
@@ -31,6 +35,7 @@
#
class python (
$version = 'system',
+ $pip = false,
$dev = false,
$virtualenv = false,
$gunicorn = false
diff --git a/manifests/install.pp b/manifests/install.pp
index 6454377..9306e3a 100644
--- a/manifests/install.pp
+++ b/manifests/install.pp
@@ -17,7 +17,13 @@ class python::install {
default => absent,
}
- package { [ $pythondev, 'python-pip' ]: ensure => $dev_ensure }
+ $pip_ensure = $python::pip ? {
+ true => present,
+ default => absent,
+ }
+
+ package { $pythondev: ensure => $dev_ensure }
+ package { 'python-pip': ensure => $pip_ensure }
$venv_ensure = $python::virtualenv ? {
true => present,