Skip to content

Commit

Permalink
Update to support SCL Python 3.6 (rh-python36)
Browse files Browse the repository at this point in the history
- Add 'rh-python36' as default for version "" and "3"
- Allow 'rh-python35' for RHEL 6 (remove special case)
- Update tests accordingly
- Fixes poise#125
  • Loading branch information
jflemer-ndp committed Aug 13, 2018
1 parent 861bf06 commit e0cced4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/poise_python/python_providers/scl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module PythonProviders
class Scl < Base
include PoiseLanguages::Scl::Mixin
provides(:scl)
scl_package('3.5.1', 'rh-python35', 'rh-python35-python-devel', '>= 7.0')
scl_package('3.6.3', 'rh-python36', 'rh-python36-python-devel')
scl_package('3.5.1', 'rh-python35', 'rh-python35-python-devel')
scl_package('3.4.2', 'rh-python34', 'rh-python34-python-devel')
scl_package('3.3.2', 'python33', 'python33-python-devel')
scl_package('2.7.8', 'python27', 'python27-python-devel')
Expand Down
14 changes: 12 additions & 2 deletions test/spec/python_providers/scl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

context 'with version ""' do
let(:python_version) { '' }
it_behaves_like 'scl provider', 'rh-python35'
it_behaves_like 'scl provider', 'rh-python36'
end # /context with version ""

context 'with version "2"' do
Expand All @@ -51,9 +51,19 @@

context 'with version "3"' do
let(:python_version) { '3' }
it_behaves_like 'scl provider', 'rh-python36'
end # /context with version "3"

context 'with version "3.5"' do
let(:python_version) { '3.5' }
it_behaves_like 'scl provider', 'rh-python35'
end # /context with version "3"

context 'with version "3.4"' do
let(:python_version) { '3.4' }
it_behaves_like 'scl provider', 'rh-python34'
end # /context with version "3"

context 'with version "3.3"' do
let(:python_version) { '3.3' }
it_behaves_like 'scl provider', 'python33'
Expand All @@ -62,7 +72,7 @@
context 'with version "" on CentOS 6' do
let(:chefspec_options) { {platform: 'centos', version: '6.9'} }
let(:python_version) { '' }
it_behaves_like 'scl provider', 'rh-python34'
it_behaves_like 'scl provider', 'rh-python36'
end # /context with version "" on CentOS 6

context 'action :uninstall' do
Expand Down

0 comments on commit e0cced4

Please sign in to comment.