This repository was archived by the owner on May 16, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535
3636default [ 'python' ] [ 'url' ] = 'http://www.python.org/ftp/python'
3737default [ 'python' ] [ 'version' ] = '2.7.1'
38- default [ 'python' ] [ 'checksum' ] = '80e387bcf57eae8ce26726753584fd63e060ec11682d1145af921e85fd612292'
3938default [ 'python' ] [ 'configure_options' ] = %W{ --prefix=#{ python [ 'prefix_dir' ] } }
39+
40+ if platform? ( 'windows' )
41+ if kernel [ 'machine' ] =~ /x86_64/
42+ default [ 'python' ] [ 'checksum' ] = '48ad736ec1bd74115df47f56c4ea770bc39dcde96a3f94270a549167e7f4dc65'
43+ else
44+ default [ 'python' ] [ 'checksum' ] = '0af8bc05a5f9ed15df120150c6a6ddd0fc50d018e35b891cba22040e0404dfb6'
45+ end
46+ else
47+ default [ 'python' ] [ 'checksum' ] = '80e387bcf57eae8ce26726753584fd63e060ec11682d1145af921e85fd612292'
48+ end
Original file line number Diff line number Diff line change 1818# limitations under the License.
1919#
2020
21- msi_checksum = node [ 'python' ] [ 'checksum' ]
21+ checksum = node [ 'python' ] [ 'checksum' ]
2222version = node [ 'python' ] [ 'version' ]
2323
24- is_64_bit = ENV . has_key? ( 'ProgramFiles(x86)' )
25- msi_file_name = "python-#{ version } .amd64.msi" if is_64_bit
26- msi_file_name = "python-#{ version } .msi" unless is_64_bit
24+ if kernel [ 'machine' ] =~ /x86_64/
25+ msi_file_name = "python-#{ version } .amd64.msi"
26+ else
27+ msi_file_name = "python-#{ version } .msi"
28+ end
2729
28- msi_url = "#{ node [ 'python' ] [ 'url' ] } / #{ version } / #{ msi_file_name } "
29- msi_local = cached_file ( msi_url , msi_checksum )
30+ package_name = "Python #{ version } "
31+ url = " #{ node [ 'python' ] [ 'url' ] } / #{ version } / #{ msi_file_name } "
3032
31- windows_package "Python #{ version } " do
33+ windows_package package_name do
3234 action :install
33- source msi_local
34- checksum msi_checksum
35+ source url
36+ checksum checksum
3537 options 'ALLUSERS=1' #Workaround for http://bugs.python.org/issue16188
3638 installer_type :msi
3739end
You can’t perform that action at this time.
0 commit comments