OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Swarming Authors. All rights reserved. | 2 # Copyright 2014 The Swarming Authors. All rights reserved. |
3 # Use of this source code is governed by the Apache v2.0 license that can be | 3 # Use of this source code is governed by the Apache v2.0 license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Generates the swarming_bot.zip archive for the bot. | 6 """Generates the swarming_bot.zip archive for the bot. |
7 | 7 |
8 Unlike the other scripts, this file can be run stand-alone to generate a | 8 Unlike the other scripts, this file can be run stand-alone to generate a |
9 swarming_bot.zip so it doesn't import anything from the AppEngine SDK. | 9 swarming_bot.zip so it doesn't import anything from the AppEngine SDK. |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 # List of files needed by the swarming bot. | 29 # List of files needed by the swarming bot. |
30 # TODO(maruel): Make the list automatically generated? | 30 # TODO(maruel): Make the list automatically generated? |
31 FILES = ( | 31 FILES = ( |
32 '__main__.py', | 32 '__main__.py', |
33 'bot.py', | 33 'bot.py', |
34 'bot_main.py', | 34 'bot_main.py', |
35 'client/auth.py', | 35 'client/auth.py', |
36 'client/isolated_format.py', | 36 'client/isolated_format.py', |
37 'client/isolateserver.py', | 37 'client/isolateserver.py', |
38 'client/run_isolated.py', | 38 'client/run_isolated.py', |
39 'logging_utils.py', | |
40 'os_utilities.py', | 39 'os_utilities.py', |
41 'task_runner.py', | 40 'task_runner.py', |
42 'third_party/__init__.py', | 41 'third_party/__init__.py', |
43 'third_party/colorama/__init__.py', | 42 'third_party/colorama/__init__.py', |
44 'third_party/colorama/ansi.py', | 43 'third_party/colorama/ansi.py', |
45 'third_party/colorama/ansitowin32.py', | 44 'third_party/colorama/ansitowin32.py', |
46 'third_party/colorama/initialise.py', | 45 'third_party/colorama/initialise.py', |
47 'third_party/colorama/win32.py', | 46 'third_party/colorama/win32.py', |
48 'third_party/colorama/winterm.py', | 47 'third_party/colorama/winterm.py', |
49 'third_party/depot_tools/__init__.py', | 48 'third_party/depot_tools/__init__.py', |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 'third_party/rsa/rsa/pem.py', | 138 'third_party/rsa/rsa/pem.py', |
140 'third_party/rsa/rsa/pkcs1.py', | 139 'third_party/rsa/rsa/pkcs1.py', |
141 'third_party/rsa/rsa/prime.py', | 140 'third_party/rsa/rsa/prime.py', |
142 'third_party/rsa/rsa/randnum.py', | 141 'third_party/rsa/rsa/randnum.py', |
143 'third_party/rsa/rsa/transform.py', | 142 'third_party/rsa/rsa/transform.py', |
144 'third_party/rsa/rsa/util.py', | 143 'third_party/rsa/rsa/util.py', |
145 'third_party/rsa/rsa/varblock.py', | 144 'third_party/rsa/rsa/varblock.py', |
146 'utils/__init__.py', | 145 'utils/__init__.py', |
147 'utils/cacert.pem', | 146 'utils/cacert.pem', |
148 'utils/file_path.py', | 147 'utils/file_path.py', |
| 148 'utils/logging_utils.py', |
149 'utils/lru.py', | 149 'utils/lru.py', |
150 'utils/net.py', | 150 'utils/net.py', |
151 'utils/oauth.py', | 151 'utils/oauth.py', |
152 'utils/on_error.py', | 152 'utils/on_error.py', |
153 'utils/subprocess42.py', | 153 'utils/subprocess42.py', |
154 'utils/threading_utils.py', | 154 'utils/threading_utils.py', |
155 'utils/tools.py', | 155 'utils/tools.py', |
156 'utils/zip_package.py', | 156 'utils/zip_package.py', |
157 'xsrf_client.py', | 157 'xsrf_client.py', |
158 ) | 158 ) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 with open(os.path.join(swarming_bot_dir, 'bot_config.py'), 'rb') as f: | 245 with open(os.path.join(swarming_bot_dir, 'bot_config.py'), 'rb') as f: |
246 additionals = {'bot_config.py': f.read()} | 246 additionals = {'bot_config.py': f.read()} |
247 with open(zip_file, 'wb') as f: | 247 with open(zip_file, 'wb') as f: |
248 f.write( | 248 f.write( |
249 get_swarming_bot_zip(swarming_bot_dir, config['server'], additionals)) | 249 get_swarming_bot_zip(swarming_bot_dir, config['server'], additionals)) |
250 return 0 | 250 return 0 |
251 | 251 |
252 | 252 |
253 if __name__ == '__main__': | 253 if __name__ == '__main__': |
254 sys.exit(main()) | 254 sys.exit(main()) |
OLD | NEW |