| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 """Extension script to <build>/scripts/common/env.py to add 'build_internal' | 5 """Extension script to <build>/scripts/common/env.py to add 'build_internal' |
| 6 paths. | 6 paths. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 import os | 9 import os |
| 10 | 10 |
| 11 def Extend(pythonpath, cwd): | 11 def Extend(pythonpath, cwd): |
| 12 """Path extension function (see common.env). | 12 """Path extension function (see common.env). |
| 13 | 13 |
| 14 In this invocation, 'cwd' is the <build> directory. | 14 In this invocation, 'cwd' is the <build> directory. |
| 15 """ | 15 """ |
| 16 third_party_base = os.path.join(cwd, 'third_party') | 16 third_party_base = os.path.join(cwd, 'third_party') |
| 17 build_path = [ | 17 build_path = [ |
| 18 os.path.join(cwd, os.pardir, 'depot_tools'), |
| 18 os.path.join(cwd, 'scripts'), | 19 os.path.join(cwd, 'scripts'), |
| 19 os.path.join(cwd, 'site_config'), | 20 os.path.join(cwd, 'site_config'), |
| 20 third_party_base, | 21 third_party_base, |
| 21 ] | 22 ] |
| 22 | 23 |
| 23 # Add 'BUILD/third_party' paths. | 24 # Add 'BUILD/third_party' paths. |
| 24 build_path += [os.path.join(third_party_base, *parts) for parts in ( | 25 build_path += [os.path.join(third_party_base, *parts) for parts in ( |
| 25 ('buildbot_8_4p1',), | 26 ('buildbot_8_4p1',), |
| 26 ('buildbot_slave_8_4',), | 27 ('buildbot_slave_8_4',), |
| 27 ('jinja2',), | 28 ('jinja2',), |
| 28 ('markupsafe',), | 29 ('markupsafe',), |
| 29 ('mock-1.0.1',), | 30 ('mock-1.0.1',), |
| 30 ('coverage-3.7.1',), | 31 ('coverage-3.7.1',), |
| 31 ('twisted_10_2',), | 32 ('twisted_10_2',), |
| 32 ('requests_1_2_3',), | 33 ('requests_1_2_3',), |
| 33 ('sqlalchemy_0_7_1',), | 34 ('sqlalchemy_0_7_1',), |
| 34 ('sqlalchemy_migrate_0_7_1',), | 35 ('sqlalchemy_migrate_0_7_1',), |
| 35 ('tempita_0_5',), | 36 ('tempita_0_5',), |
| 36 ('decorator_3_3_1',), | 37 ('decorator_3_3_1',), |
| 37 ('setuptools-0.6c11',), | 38 ('setuptools-0.6c11',), |
| 38 ('httplib2', 'python2',), | 39 ('httplib2', 'python2',), |
| 39 ('oauth2client',), | 40 ('oauth2client',), |
| 40 ('uritemplate',), | 41 ('uritemplate',), |
| 41 ('google_api_python_client',), | 42 ('google_api_python_client',), |
| 42 ('site-packages',), | 43 ('site-packages',), |
| 43 )] | 44 )] |
| 44 return pythonpath.Append(*build_path) | 45 return pythonpath.Append(*build_path) |
| OLD | NEW |