diff --git a/manifests/config.pp b/manifests/config.pp index 787bd31..0dd934b 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -6,4 +6,15 @@ $venv_home = "${boxen::config::datadir}/virturalenvs" # The "global" scope for python modules in boxen $global_venv = $homebrew::config::installdir + + file { "${boxen::config::envdir}/python.sh": + ensure => absent, + } + + -> + boxen::env_script { 'python': + ensure => present, + content => template('python/python.sh.erb'), + priority => 'lower', + } } diff --git a/manifests/init.pp b/manifests/init.pp index 6db2564..479a418 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -30,13 +30,4 @@ target => "${homebrew::config::installdir}/Cellar/python/${version}/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages", require => Package['boxen/brews/python'] ; } - - boxen::env_script { 'python': - priority => 'lower', - source => 'puppet:///modules/python/python.sh', - } - - file { "${boxen::config::envdir}/python.sh": - ensure => absent, - } } diff --git a/manifests/mkvirtualenv.pp b/manifests/mkvirtualenv.pp index 895a847..1b0a535 100644 --- a/manifests/mkvirtualenv.pp +++ b/manifests/mkvirtualenv.pp @@ -63,8 +63,7 @@ provider => 'shell', user => $::boxen_user, creates => $venv_path, - require => [File["${boxen::config::envdir}/python_venvwrapper.sh"], - Class['python::virtualenvwrapper']] + require => Class['python::virtualenvwrapper'], } if $post_activate { file{ "python_mkenv_${name} postactivate": diff --git a/manifests/virtualenvwrapper.pp b/manifests/virtualenvwrapper.pp index 2c076ac..b8c70c7 100644 --- a/manifests/virtualenvwrapper.pp +++ b/manifests/virtualenvwrapper.pp @@ -17,7 +17,13 @@ } file { "${boxen::config::envdir}/python_venvwrapper.sh": - content => template('python/python_venvwrapper.sh.erb') + ensure => absent, + } + + -> + boxen::env_script { 'python_virtualenvwrapper': + ensure => present, + content => template('python/python_venvwrapper.sh.erb'), + priority => 'lower', } - # add to the boxen env calls to wrapper.sh file } diff --git a/files/python.sh b/templates/python.sh.erb similarity index 100% rename from files/python.sh rename to templates/python.sh.erb