Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: tools/export_tarball/export_tarball.py

Issue 7685042: Switching IRT to be built inside the chrome build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/nacl.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ 6 """
7 This tool creates a tarball with all the sources, but without .svn directories. 7 This tool creates a tarball with all the sources, but without .svn directories.
8 8
9 It can also remove files which are not strictly required for build, so that 9 It can also remove files which are not strictly required for build, so that
10 the resulting tarball can be reasonably small (last time it was ~110 MB). 10 the resulting tarball can be reasonably small (last time it was ~110 MB).
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 if len(args) != 1: 92 if len(args) != 1:
93 print 'You must provide only one argument: output file name' 93 print 'You must provide only one argument: output file name'
94 print '(without .tar.bz2 extension).' 94 print '(without .tar.bz2 extension).'
95 return 1 95 return 1
96 96
97 if not os.path.exists(GetSourceDirectory()): 97 if not os.path.exists(GetSourceDirectory()):
98 print 'Cannot find the src directory.' 98 print 'Cannot find the src directory.'
99 return 1 99 return 1
100 100
101 nacl_download_path = os.path.join(
102 GetSourceDirectory(), 'build', 'download_nacl_irt.py')
103 nacl_cwd = os.path.join(GetSourceDirectory(), '..')
104 if subprocess.call(['python', nacl_download_path], cwd=nacl_cwd) != 0:
105 # The error is not fatal - NaCl is still experimental.
106 print 'Failed to download NaCl integrated runtime files.'
107 print 'The NaCl-enabled build will fail. You can pass -Ddisable_nacl=1'
108 print 'to gyp as a workaround. For more info see'
109 print ('http://groups.google.com/a/chromium.org/group/chromium-dev/'
110 'browse_thread/thread/1fe6e2c3f9e78c2b')
111
112 output_fullname = args[0] + '.tar.bz2' 101 output_fullname = args[0] + '.tar.bz2'
113 output_basename = os.path.basename(args[0]) 102 output_basename = os.path.basename(args[0])
114 103
115 archive = MyTarFile.open(output_fullname, 'w:bz2') 104 archive = MyTarFile.open(output_fullname, 'w:bz2')
116 archive.set_remove_nonessential_files(options.remove_nonessential_files) 105 archive.set_remove_nonessential_files(options.remove_nonessential_files)
117 try: 106 try:
118 archive.add(GetSourceDirectory(), arcname=output_basename) 107 archive.add(GetSourceDirectory(), arcname=output_basename)
119 finally: 108 finally:
120 archive.close() 109 archive.close()
121 110
122 return 0 111 return 0
123 112
124 if __name__ == "__main__": 113 if __name__ == "__main__":
125 sys.exit(main(sys.argv[1:])) 114 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « chrome/nacl.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698