Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 2aef5e92fb99d04dc595d88fb7c3f00fe5c343e4 @ashwoods committed Feb 21, 2012
Showing with 104 additions and 0 deletions.
  1. +24 −0 LICENSE
  2. +1 −0 README
  3. +8 −0 manifests/dependencies.pp
  4. +41 −0 manifests/dependencies/debian.pp
  5. +11 −0 manifests/init.pp
  6. +19 −0 manifests/version.pp
24 LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
1 README
@@ -0,0 +1 @@
+Not working yet. Will be a puppet module for pythonbrew.
@@ -0,0 +1,8 @@
+
+class pythonbrew::dependencies {
+ require => Anchor['pythonbrew::begin'],
+ case $operatingsystem {
+ Ubuntu,Debian: { require pythonbrew::dependencies::debian }
+ CentOS,RedHat: { require pythonbrew::dependencies::centos }
+ }
+}
@@ -0,0 +1,41 @@
+class pythonbrew::dependencies::ubuntu {
+
+ if ! defined(Package['curl']) { package { 'curl': ensure => installed } }
+ if ! defined(Package['build-essential']) { package { 'build-essential': ensure => installed } }
+
+ if ! defined(Package['libgdbm-dev']) { package { 'libgdbm-dev': ensure => installed } }
+ if ! defined(Package['libgdb-dev']) { package { 'libgdb-dev': ensure => installed } }
+
+ if ! defined(Package['libbz2-dev']) { package { 'libbz2-dev': ensure => installed } }
+
+ if ! defined(Package['libreadline6']) { package { 'libreadline6': ensure => installed } }
+ if ! defined(Package['libreadline6-dev']) { package { 'libreadline6-dev': ensure => installed } }
+ if ! defined(Package['zlib1g']) { package { 'zlib1g': ensure => installed } }
+ if ! defined(Package['zlib1g-dev']) { package { 'zlib1g-dev': ensure => installed } }
+
+ if ! defined(Package['openssl']) { package { 'openssl': ensure => installed } }
+ if ! defined(Package['libssl-dev']) { package { 'libssl-dev': ensure => installed } }
+ if ! defined(Package['libsqlite3-0']) { package { 'libsqlite3-0': ensure => installed } }
+ if ! defined(Package['libsqlite3-dev']) { package { 'libsqlite3-dev': ensure => installed } }
+ if ! defined(Package['sqlite3']) { package { 'sqlite3': ensure => installed } }
+
+ if ! defined(Package['tk-dev']) { package { 'tk-dev': ensure => installed } }
+ if ! defined(Package['libxml2']) { package { 'libxml2': ensure => installed } }
+ if ! defined(Package['libxml2-dev']) { package { 'libxml2-dev': ensure => installed } }
+ if ! defined(Package['libxslt1-dev']) { package { 'libxslt1-dev': ensure => installed, alias => 'libxslt-dev' } }
+ if ! defined(Package['libexpat1-dev']) { package { 'libexpat1-dev': ensure => installed } }
+
+ if ! defined(Package['autoconf']) { package { 'autoconf': ensure => installed } }
+ if ! defined(Package['libc6-dev']) { package { 'libc6-dev': ensure => installed } }
+
+ if ! defined(Package['libncursesw5-dev']) { package { 'libncursesw5-dev': ensure => installed } }
+
+ # for PIP
+ if ! defined(Package['git-core']) { package { 'git-core': ensure => installed } }
+ if ! defined(Package['mercurial']) { package { 'mercurial': ensure => installed } }
+
+ if ! defined(Package['libjpeg8']) { package { 'libjpeg8': ensure => installed } }
+ if ! defined(Package['libjpeg8-dev ']) { package { 'libjpeg8-dev': ensure => installed } }
+ if ! defined(Package['libfreetype6 ']) { package { 'libfreetype6': ensure => installed } }
+ if ! defined(Package['libfreetype6-dev']) { package { 'libfreetype6-dev': ensure => installed } }
+}
@@ -0,0 +1,11 @@
+
+class pythonbrew($user='root') {
+ anchor {'pythonbrew::begin'}
+ anchor {'pythonbrew::end'}
+
+ exec {'pythonbrew::install':
+ command => "curl -kL http://xrl.us/pythonbrewinstall | bash",
+ require => Class['pythonbrew::dependencies'],
+ user => $user,
+ }
+}
@@ -0,0 +1,19 @@
+define pythonbrew::define::version (
+ $ensure => 'present',
+ $default => 'false',
+ $test => 'false',
+ ) {
+
+ require => Anchor['pythonbrew::end']
+
+ if $ensure == 'present' {
+ exec { "install-python-${name}":
+ command => "pythonbrew install ${name} -n",
+ unless => "pythonbrew list | grep ${name}",
+ timeout => '0',
+ require => Anchor['pythonbrew::end'],
+ user => $user,
+ }
+
+ }
+}

0 comments on commit 2aef5e9

Please sign in to comment.