OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 """Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 """Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 | 4 |
5 Use of this source code is governed by a BSD-style license that can be | 5 Use of this source code is governed by a BSD-style license that can be |
6 found in the LICENSE file. | 6 found in the LICENSE file. |
7 | 7 |
8 Eclipse Dart Editor util functions. | 8 Eclipse Dart Editor util functions. |
9 """ | 9 """ |
10 import os | 10 import os |
11 | 11 |
12 | 12 |
13 class BuildUtil(object): | 13 class BuildUtil(object): |
14 """Utility methods for doing the build.""" | 14 """Utility methods for doing the build.""" |
15 _project = 'com.google.dart.tools.deploy.feature_releng' | 15 _project = 'com.google.dart.tools.deploy.feature_releng' |
16 _buildout = None | 16 _buildout = None |
17 _buildos = None | 17 _buildos = None |
18 _dartpath = None | 18 _dartpath = None |
19 _sdkpath = None | 19 _sdkpath = None |
20 _pathending = 'Release_ia32' | 20 _pathending = 'ReleaseIA32' |
21 | 21 |
22 def __init__(self, buildos, buildout, dartpath): | 22 def __init__(self, buildos, buildout, dartpath): |
23 """Initialize this class. | 23 """Initialize this class. |
24 | 24 |
25 Args: | 25 Args: |
26 buildos: the os the build is running under | 26 buildos: the os the build is running under |
27 buildout: the build out directory | 27 buildout: the build out directory |
28 dartpath: the path to the root of the dart source tree | 28 dartpath: the path to the root of the dart source tree |
29 """ | 29 """ |
30 self._buildos = buildos | 30 self._buildos = buildos |
(...skipping 14 matching lines...) Expand all Loading... |
45 relpath = os.path.join(tail, relpath) | 45 relpath = os.path.join(tail, relpath) |
46 checkpath = head | 46 checkpath = head |
47 (head, tail) = os.path.split(checkpath) | 47 (head, tail) = os.path.split(checkpath) |
48 else: | 48 else: |
49 relpath = os.path.join(self._dartpath, self._sdk_paths[self._buildos]) | 49 relpath = os.path.join(self._dartpath, self._sdk_paths[self._buildos]) |
50 | 50 |
51 if self._pathending not in relpath: #this handles local builds | 51 if self._pathending not in relpath: #this handles local builds |
52 relpath = os.path.join(relpath, self._pathending) | 52 relpath = os.path.join(relpath, self._pathending) |
53 | 53 |
54 return os.path.join(self._dartpath, relpath) | 54 return os.path.join(self._dartpath, relpath) |
OLD | NEW |