diff --git a/REFERENCE.md b/REFERENCE.md index 555cb05a..a12a230c 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -87,7 +87,7 @@ Allowed values: - 3/3.3/... means you are going to install the python3/python3.3/... package, if available on your osfamily. -Default value: `$python::params::version` +Default value: `'3'` ##### `pip` diff --git a/manifests/init.pp b/manifests/init.pp index a184b2aa..74da7eb6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -34,7 +34,7 @@ # class python ( Python::Package::Ensure $ensure = $python::params::ensure, - Python::Version $version = $python::params::version, + Python::Version $version = '3', Python::Package::Ensure $pip = $python::params::pip, Python::Package::Ensure $dev = $python::params::dev, Python::Package::Ensure $gunicorn = $python::params::gunicorn, diff --git a/manifests/params.pp b/manifests/params.pp index 89a5ccce..e1ed7c21 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -45,12 +45,4 @@ 'RedHat' => 'python-gunicorn', default => 'gunicorn', } - - if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '8' { - $version = '3' - } elsif $facts['os']['release']['major'] == '20.04' { - $version = '3' - } else { - $version = 'system' - } } diff --git a/spec/acceptance/pyvenv_spec.rb b/spec/acceptance/pyvenv_spec.rb index f648fa31..c137d0b9 100644 --- a/spec/acceptance/pyvenv_spec.rb +++ b/spec/acceptance/pyvenv_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper_acceptance' -describe 'python::pyvenv defined resource' do +describe 'python::pyvenv defined resource with python 3' do context 'minimal parameters' do # Using puppet_apply as a helper it 'works with no errors' do diff --git a/spec/classes/python_spec.rb b/spec/classes/python_spec.rb index 28f5f1f4..f8223d2d 100644 --- a/spec/classes/python_spec.rb +++ b/spec/classes/python_spec.rb @@ -216,8 +216,8 @@ it { is_expected.to contain_class('python::install') } # Base Suse packages. it { is_expected.to contain_package('python') } - it { is_expected.to contain_package('python-dev').with_name('python-devel') } - it { is_expected.to contain_package('python-dev').with_alias('python-devel') } + it { is_expected.to contain_package('python-dev').with_name('python3-devel') } + it { is_expected.to contain_package('python-dev').with_alias('python3-devel') } it { is_expected.to contain_package('pip') } describe 'with python::dev' do