|
9 | 9 | # Path to install Globus CLI virtualenv |
10 | 10 | # @param manage_python |
11 | 11 | # Boolean to set if Python is managed by this class |
12 | | -# @param virtualenv_provider |
13 | | -# Virtualenv command to use |
14 | | -# @param pip_provider |
15 | | -# Pip command to use |
16 | 12 | class globus::sdk ( |
17 | 13 | String[1] $ensure = 'present', |
18 | 14 | Stdlib::Absolutepath $install_path = '/opt/globus-sdk', |
19 | 15 | Boolean $manage_python = true, |
20 | | - String $virtualenv_provider = '/usr/bin/virtualenv', |
21 | | - String $pip_provider = 'pip', |
22 | 16 | ) { |
23 | 17 |
|
24 | 18 | if $facts.dig('os','name') == 'Ubuntu' and $facts.dig('os','release','major') == '20.04' { |
|
27 | 21 |
|
28 | 22 | if $manage_python { |
29 | 23 | include globus::python |
30 | | - $virtualenv_require = Package['virtualenv'] |
31 | | - } else { |
32 | | - $virtualenv_require = undef |
33 | 24 | } |
34 | 25 |
|
35 | | - if $facts['os']['family'] == 'RedHat' { |
36 | | - python::virtualenv { 'globus-sdk': |
37 | | - ensure => 'present', |
38 | | - version => $globus::python::version, |
39 | | - virtualenv => $virtualenv_provider, |
40 | | - venv_dir => $install_path, |
41 | | - distribute => false, |
42 | | - before => Python::Pip['globus-sdk'], |
43 | | - require => $virtualenv_require, |
44 | | - } |
45 | | - } elsif $facts['os']['family'] == 'Debian' { |
46 | | - python::pyvenv { 'globus-sdk': |
47 | | - ensure => 'present', |
48 | | - version => $globus::python::version, |
49 | | - venv_dir => $install_path, |
50 | | - before => Python::Pip['globus-sdk'], |
51 | | - require => $virtualenv_require, |
52 | | - } |
53 | | - } else { |
54 | | - fail('globus::sdk: Unsupported OS family') |
| 26 | + python::pyvenv { 'globus-sdk': |
| 27 | + ensure => 'present', |
| 28 | + version => $globus::python::venv_python_version, |
| 29 | + venv_dir => $install_path, |
| 30 | + before => Python::Pip['globus-sdk'], |
55 | 31 | } |
56 | 32 |
|
57 | 33 | python::pip { 'globus-sdk': |
58 | 34 | ensure => $ensure, |
59 | | - pip_provider => $pip_provider, |
| 35 | + pip_provider => $globus::python::pip_provider, |
60 | 36 | virtualenv => $install_path, |
61 | 37 | } |
62 | 38 | } |
0 commit comments