Skip to content

Commit 17debdc

Browse files
committed
Made the pip package independent from the dev package in the python class and updated version to 1.1.1
1 parent 01bf279 commit 17debdc

4 files changed

Lines changed: 19 additions & 5 deletions

File tree

Modulefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name 'puppet-python'
2-
version '1.1.0'
2+
version '1.1.1'
33

44
author 'Sergey Stankevich'
55
license 'Apache License, Version 2.0'

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33

44
Puppet module for installing and managing python, pip, virtualenvs and Gunicorn virtual hosts.
55

6-
**Version 1.1.0 Notes**
6+
**Version 1.1.1 Notes**
77

8-
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.
8+
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.
99

10-
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.
10+
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.
1111

1212
Currently, the changes you need to make are as follows:
1313

1414
* 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.
15+
* 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.
1516

1617
## Installation
1718

@@ -28,6 +29,8 @@ Installs and manages python, python-dev, python-virtualenv and Gunicorn.
2829

2930
**version** - Python version to install. Default: system default
3031

32+
**pip** - Install python-pip. Default: false
33+
3134
**dev** - Install python-dev. Default: false
3235

3336
**virtualenv** - Install python-virtualenv. Default: false

manifests/init.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# [*version*]
88
# Python version to install. Default: system default
99
#
10+
# [*pip*]
11+
# Install python-pip. Default: false
12+
#
1013
# [*dev*]
1114
# Install python-dev. Default: false
1215
#
@@ -20,6 +23,7 @@
2023
#
2124
# class { 'python':
2225
# version => 'system',
26+
# pip => true,
2327
# dev => true,
2428
# virtualenv => true,
2529
# gunicorn => true,
@@ -31,6 +35,7 @@
3135
#
3236
class python (
3337
$version = 'system',
38+
$pip = false,
3439
$dev = false,
3540
$virtualenv = false,
3641
$gunicorn = false

manifests/install.pp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717
default => absent,
1818
}
1919

20-
package { [ $pythondev, 'python-pip' ]: ensure => $dev_ensure }
20+
$pip_ensure = $python::pip ? {
21+
true => present,
22+
default => absent,
23+
}
24+
25+
package { $pythondev: ensure => $dev_ensure }
26+
package { 'python-pip': ensure => $pip_ensure }
2127

2228
$venv_ensure = $python::virtualenv ? {
2329
true => present,

0 commit comments

Comments
 (0)