|
49 | 49 | $gunicorn_package_name = $python::params::gunicorn_package_name, |
50 | 50 | Optional[Enum['pip', 'scl', 'rhscl', 'anaconda', '']] $provider = $python::params::provider, |
51 | 51 | $valid_versions = $python::params::valid_versions, |
52 | | - Hash $python_pips = { }, |
53 | | - Hash $python_virtualenvs = { }, |
54 | | - Hash $python_pyvenvs = { }, |
55 | | - Hash $python_requirements = { }, |
56 | | - Hash $python_dotfiles = { }, |
| 52 | + Hash $python_pips = {}, |
| 53 | + Hash $python_virtualenvs = {}, |
| 54 | + Hash $python_pyvenvs = {}, |
| 55 | + Hash $python_requirements = {}, |
| 56 | + Hash $python_dotfiles = {}, |
57 | 57 | Boolean $use_epel = $python::params::use_epel, |
58 | 58 | $rhscl_use_public_repository = $python::params::rhscl_use_public_repository, |
59 | 59 | Stdlib::Httpurl $anaconda_installer_url = $python::params::anaconda_installer_url, |
60 | 60 | Stdlib::Absolutepath $anaconda_install_path = $python::params::anaconda_install_path, |
61 | 61 | Boolean $manage_scl = $python::params::manage_scl, |
62 | 62 | Optional[Pattern[/[0-7]{1,4}/]] $umask = undef, |
63 | 63 | ) inherits python::params { |
64 | | - |
65 | 64 | $exec_prefix = $provider ? { |
66 | 65 | 'scl' => "/usr/bin/scl enable ${version} -- ", |
67 | 66 | 'rhscl' => "/usr/bin/scl enable ${version} -- ", |
68 | 67 | default => '', |
69 | 68 | } |
70 | 69 |
|
71 | 70 | unless $version =~ Pattern[/\A(python)?[0-9](\.?[0-9])*/, |
72 | | - /\Apypy\Z/, /\Asystem\Z/, /\Arh-python[0-9]{2}(?:-python)?\Z/] { |
| 71 | + /\Apypy\Z/, /\Asystem\Z/, /\Arh-python[0-9]{2}(?:-python)?\Z/] { |
73 | 72 | fail("version needs to be pypy, system or a version string like '36', '3.6' or 'python3.6' )") |
74 | 73 | } |
75 | 74 |
|
76 | 75 | # Module compatibility check |
77 | | - $compatible = [ 'Debian', 'RedHat', 'Suse', 'Gentoo', 'AIX' ] |
| 76 | + $compatible = ['Debian', 'RedHat', 'Suse', 'Gentoo', 'AIX'] |
78 | 77 | if ! ($facts['os']['family'] in $compatible) { |
79 | 78 | fail("Module is not compatible with ${facts['os']['name']}") |
80 | 79 | } |
|
96 | 95 | create_resources('python::virtualenv', $python_virtualenvs) |
97 | 96 | create_resources('python::requirements', $python_requirements) |
98 | 97 | create_resources('python::dotfile', $python_dotfiles) |
99 | | - |
100 | 98 | } |
0 commit comments