OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import fnmatch | 5 import fnmatch |
6 import glob | 6 import glob |
7 import os | 7 import os |
8 import shutil | 8 import shutil |
9 import sys | 9 import sys |
10 import tempfile | 10 import tempfile |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 | 151 |
152 Moves pak files from the output directory to to <isolate_deps_dir>/paks | 152 Moves pak files from the output directory to to <isolate_deps_dir>/paks |
153 Moves files from the product directory to <isolate_deps_dir> | 153 Moves files from the product directory to <isolate_deps_dir> |
154 """ | 154 """ |
155 # On Android, all pak files need to be in the top-level 'paks' directory. | 155 # On Android, all pak files need to be in the top-level 'paks' directory. |
156 paks_dir = os.path.join(self._isolate_deps_dir, 'paks') | 156 paks_dir = os.path.join(self._isolate_deps_dir, 'paks') |
157 os.mkdir(paks_dir) | 157 os.mkdir(paks_dir) |
158 | 158 |
159 deps_out_dir = os.path.join( | 159 deps_out_dir = os.path.join( |
160 self._isolate_deps_dir, | 160 self._isolate_deps_dir, |
161 os.path.relpath(os.path.join(constants.GetOutDirectory(), os.pardir), | 161 os.path.relpath(constants.GetOutDirectory(), constants.DIR_SOURCE_ROOT)) |
jbudorick
2015/10/14 17:56:30
Yeah, this will definitely break our GYP builds at
| |
162 constants.DIR_SOURCE_ROOT)) | |
163 for root, _, filenames in os.walk(deps_out_dir): | 162 for root, _, filenames in os.walk(deps_out_dir): |
164 for filename in fnmatch.filter(filenames, '*.pak'): | 163 for filename in fnmatch.filter(filenames, '*.pak'): |
165 shutil.move(os.path.join(root, filename), paks_dir) | 164 shutil.move(os.path.join(root, filename), paks_dir) |
166 | 165 |
167 # Move everything in PRODUCT_DIR to top level. | 166 # Move everything in PRODUCT_DIR to top level. |
168 deps_product_dir = os.path.join(deps_out_dir, constants.GetBuildType()) | 167 deps_product_dir = os.path.join(deps_out_dir, constants.GetBuildType()) |
169 if os.path.isdir(deps_product_dir): | 168 if os.path.isdir(deps_product_dir): |
170 for p in os.listdir(deps_product_dir): | 169 for p in os.listdir(deps_product_dir): |
171 shutil.move(os.path.join(deps_product_dir, p), self._isolate_deps_dir) | 170 shutil.move(os.path.join(deps_product_dir, p), self._isolate_deps_dir) |
172 os.rmdir(deps_product_dir) | 171 os.rmdir(deps_product_dir) |
173 os.rmdir(deps_out_dir) | 172 os.rmdir(deps_out_dir) |
174 | 173 |
OLD | NEW |