| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 2 # Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 # This script is creating a self contained directory with all the tools, | 6 # This script is creating a self contained directory with all the tools, |
| 7 # libraries, packages and samples needed for running fletch. | 7 # libraries, packages and samples needed for running fletch. |
| 8 | 8 |
| 9 # This script assumes that the target arg has been build in the passed in | 9 # This script assumes that the target arg has been build in the passed in |
| 10 # --build_dir. It also assumes that out/ReleaseXARM/fletch-vm has been build. | 10 # --build_dir. It also assumes that out/ReleaseXARM/fletch-vm has been build. |
| 11 | 11 |
| 12 import optparse | 12 import optparse |
| 13 import subprocess | 13 import subprocess |
| 14 import sys | 14 import sys |
| 15 import utils | 15 import utils |
| 16 | 16 |
| 17 from sets import Set | 17 from sets import Set |
| 18 from os import makedirs | 18 from os import makedirs |
| 19 from os.path import dirname, join, exists, basename, abspath | 19 from os.path import dirname, join, exists, basename, abspath |
| 20 from shutil import copyfile, copymode, copytree, rmtree | 20 from shutil import copyfile, copymode, copytree, rmtree |
| 21 | 21 |
| 22 TOOLS_DIR = abspath(dirname(__file__)) | 22 TOOLS_DIR = abspath(dirname(__file__)) |
| 23 | 23 |
| 24 SDK_PACKAGES = ['file', 'fletch', 'gpio', 'http', 'i2c', 'os', | 24 SDK_PACKAGES = ['ffi', 'file', 'fletch', 'gpio', 'http', 'i2c', 'os', |
| 25 'raspberry_pi', 'socket'] | 25 'raspberry_pi', 'socket'] |
| 26 THIRD_PARTY_PACKAGES = ['charcode'] | 26 THIRD_PARTY_PACKAGES = ['charcode'] |
| 27 | 27 |
| 28 SAMPLES = ['raspberry-pi2', 'general'] | 28 SAMPLES = ['raspberry-pi2', 'general'] |
| 29 with open(join(TOOLS_DIR, 'docs_html', 'head.html')) as f: | 29 with open(join(TOOLS_DIR, 'docs_html', 'head.html')) as f: |
| 30 DOC_INDEX_HEAD = f.read() | 30 DOC_INDEX_HEAD = f.read() |
| 31 with open(join(TOOLS_DIR, 'docs_html', 'tail.html')) as f: | 31 with open(join(TOOLS_DIR, 'docs_html', 'tail.html')) as f: |
| 32 DOC_INDEX_TAIL = f.read() | 32 DOC_INDEX_TAIL = f.read() |
| 33 | 33 |
| 34 DOC_ENTRY = ('<dt><span class="name"><a class="" href="%s/index.html">%s</a>' | 34 DOC_ENTRY = ('<dt><span class="name"><a class="" href="%s/index.html">%s</a>' |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 CopySamples(sdk_temp) | 231 CopySamples(sdk_temp) |
| 232 CopyAdditionalFiles(sdk_temp) | 232 CopyAdditionalFiles(sdk_temp) |
| 233 if deb_package: | 233 if deb_package: |
| 234 CopyArmDebPackage(sdk_temp, deb_package) | 234 CopyArmDebPackage(sdk_temp, deb_package) |
| 235 sdk_dir = join(build_dir, 'fletch-sdk') | 235 sdk_dir = join(build_dir, 'fletch-sdk') |
| 236 EnsureDeleted(sdk_dir) | 236 EnsureDeleted(sdk_dir) |
| 237 copytree(sdk_temp, sdk_dir) | 237 copytree(sdk_temp, sdk_dir) |
| 238 | 238 |
| 239 if __name__ == '__main__': | 239 if __name__ == '__main__': |
| 240 sys.exit(Main()) | 240 sys.exit(Main()) |
| OLD | NEW |