Chromium Code Reviews| 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, 'scripts'), | 18 os.path.join(cwd, 'scripts'), |
| 19 os.path.join(cwd, 'site_config'), | 19 os.path.join(cwd, 'site_config'), |
| 20 third_party_base, | 20 third_party_base, |
| 21 ] | 21 ] |
| 22 | 22 |
| 23 # Add 'BUILD/third_party' paths. | 23 # Add 'BUILD/third_party' paths. |
| 24 build_path += [os.path.join(third_party_base, *parts) for parts in ( | 24 build_path += [os.path.join(third_party_base, path) for path in ( |
| 25 ('buildbot_8_4p1',), | 25 'buildbot_8_4p1', |
| 26 ('buildbot_slave_8_4',), | 26 'buildbot_slave_8_4', |
| 27 ('jinja2',), | 27 'jinja2', |
| 28 ('markupsafe',), | 28 'markupsafe', |
| 29 ('mock-1.0.1',), | 29 'mock-1.0.1', |
| 30 ('coverage-3.7.1',), | 30 'coverage-3.7.1', |
| 31 ('twisted_10_2',), | 31 'twisted_10_2', |
| 32 ('requests_2_10_0',), | 32 'requests_2_10_0', |
| 33 ('sqlalchemy_0_7_1',), | 33 'sqlalchemy_0_7_1', |
| 34 ('sqlalchemy_migrate_0_7_1',), | 34 'sqlalchemy_migrate_0_7_1', |
| 35 ('tempita_0_5',), | 35 'tempita_0_5', |
| 36 ('decorator_3_3_1',), | 36 'decorator_3_3_1', |
| 37 ('setuptools-0.6c11',), | 37 'setuptools-0.6c11', |
| 38 ('httplib2', 'python2',), | 38 'httplib2/python2', |
| 39 ('oauth2client',), | 39 'oauth2client', |
| 40 ('uritemplate',), | 40 'uritemplate', |
| 41 ('google_api_python_client',), | 41 'google_api_python_client', |
| 42 ('site-packages',), | 42 'site-packages', |
| 43 'infra_libs', | |
|
Sergey Berezin
2016/08/08 17:18:31
nit: sort alphabetically (I hope the order is not
dsansome
2016/08/09 04:29:04
I guess site-packages needs to go at the end, but
| |
| 43 )] | 44 )] |
| 44 return pythonpath.Append(*build_path) | 45 return pythonpath.Append(*build_path) |
| OLD | NEW |