File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 3434default [ 'python' ] [ 'binary' ] = "#{ node [ 'python' ] [ 'prefix_dir' ] } /bin/python"
3535
3636default [ 'python' ] [ 'url' ] = 'http://www.python.org/ftp/python'
37- default [ 'python' ] [ 'version ' ] = '2.7.5'
37+ default [ 'python' ] [ 'install_version ' ] = '2.7.5'
3838default [ 'python' ] [ 'checksum' ] = '3b477554864e616a041ee4d7cef9849751770bc7c39adaf78a94ea145c488059'
3939default [ 'python' ] [ 'configure_options' ] = %W{ --prefix=#{ python [ 'prefix_dir' ] } }
4040default [ 'python' ] [ 'make_options' ] = %W{ install }
Original file line number Diff line number Diff line change 3232 package dev_pkg
3333end
3434
35- version = node [ 'python' ] [ 'version' ]
35+ version = node . default [ 'python' ] [ 'version' ] ||
36+ node . set [ 'python' ] [ 'version' ] ||
37+ node . override [ 'python' ] [ 'version' ] ||
38+ node [ 'python' ] [ 'install_version' ]
3639install_path = "#{ node [ 'python' ] [ 'prefix_dir' ] } /bin/python#{ version . split ( /(^\d +\. \d +)/ ) [ 1 ] } "
3740
3841remote_file "#{ Chef ::Config [ :file_cache_path ] } /Python-#{ version } .tgz" do
6568 not_if { ::File . exists? ( node [ 'python' ] [ 'binary' ] ) }
6669end
6770
71+ ruby_block 'set-python-version' do
72+ block do
73+ node . default [ 'python' ] [ 'version' ] = version
74+ end
75+ end
76+
6877
You can’t perform that action at this time.
0 commit comments