Skip to content

Commit 5f6f76f

Browse files
committed
Allow rh-python36-python as a version
1 parent b83aa36 commit 5f6f76f

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

manifests/init.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# @example install python3 from scl repo
3030
# class { 'python' :
3131
# ensure => 'present',
32-
# version => 'rh-python36',
32+
# version => 'rh-python36-python',
3333
# dev => 'present',
3434
# virtualenv => 'present',
3535
# }
@@ -64,7 +64,7 @@
6464
}
6565

6666
unless $version =~ Pattern[/\A(python)?[0-9](\.[0-9])+/,
67-
/\Apypy\Z/, /\Asystem\Z/, /\Arh-python[0-9]{2}\Z/] {
67+
/\Apypy\Z/, /\Asystem\Z/, /\Arh-python[0-9]{2}(?:-python)?\Z/] {
6868
fail("version needs to be pypy, system or a version string like '3.5' or 'python3.5)")
6969
}
7070

spec/classes/python_spec.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,14 @@
249249
describe 'with python::provider' do
250250
context 'scl' do
251251
describe 'with version' do
252-
context '3.6 SCL package' do
252+
context '3.6 SCL meta package' do
253253
let(:params) { { version: 'rh-python36' } }
254254

255+
it { is_expected.to compile.with_all_deps }
256+
end
257+
context '3.6 SCL python package' do
258+
let(:params) { { version: 'rh-python36-python' } }
259+
255260
it { is_expected.to compile.with_all_deps }
256261
end
257262
end
@@ -282,9 +287,14 @@
282287
describe 'with python::provider' do
283288
context 'scl' do
284289
describe 'with version' do
285-
context '3.6 SCL package' do
290+
context '3.6 SCL meta package' do
286291
let(:params) { { version: 'rh-python36' } }
287292

293+
it { is_expected.to compile.with_all_deps }
294+
end
295+
context '3.6 SCL python package' do
296+
let(:params) { { version: 'rh-python36-python' } }
297+
288298
it { is_expected.to compile.with_all_deps }
289299
end
290300
end

0 commit comments

Comments
 (0)