Skip to content

Commit da2b6b5

Browse files
committed
Set default python to 3
1 parent c0e9c26 commit da2b6b5

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

REFERENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Allowed values:
8787
- 3/3.3/... means you are going to install the python3/python3.3/...
8888
package, if available on your osfamily.
8989

90-
Default value: `$python::params::version`
90+
Default value: `'3'`
9191

9292
##### `pip`
9393

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#
3535
class python (
3636
Python::Package::Ensure $ensure = $python::params::ensure,
37-
Python::Version $version = $python::params::version,
37+
Python::Version $version = '3',
3838
Python::Package::Ensure $pip = $python::params::pip,
3939
Python::Package::Ensure $dev = $python::params::dev,
4040
Python::Package::Ensure $gunicorn = $python::params::gunicorn,

manifests/params.pp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,4 @@
4545
'RedHat' => 'python-gunicorn',
4646
default => 'gunicorn',
4747
}
48-
49-
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '8' {
50-
$version = '3'
51-
} elsif $facts['os']['release']['major'] == '20.04' {
52-
$version = '3'
53-
} else {
54-
$version = 'system'
55-
}
5648
}

spec/acceptance/pyvenv_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'spec_helper_acceptance'
22

3-
describe 'python::pyvenv defined resource' do
3+
describe 'python::pyvenv defined resource with python 3' do
44
context 'minimal parameters' do
55
# Using puppet_apply as a helper
66
it 'works with no errors' do

spec/classes/python_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@
216216
it { is_expected.to contain_class('python::install') }
217217
# Base Suse packages.
218218
it { is_expected.to contain_package('python') }
219-
it { is_expected.to contain_package('python-dev').with_name('python-devel') }
220-
it { is_expected.to contain_package('python-dev').with_alias('python-devel') }
219+
it { is_expected.to contain_package('python-dev').with_name('python3-devel') }
220+
it { is_expected.to contain_package('python-dev').with_alias('python3-devel') }
221221
it { is_expected.to contain_package('pip') }
222222

223223
describe 'with python::dev' do

0 commit comments

Comments
 (0)