Chromium Code Reviews| Index: build/print_python_deps.py |
| diff --git a/build/print_python_deps.py b/build/print_python_deps.py |
| index 3d0c9a8e140795010476c86158a04094834abdd5..50a1f08f4bf6e87a780ac3a173b48c3e41c7705d 100755 |
| --- a/build/print_python_deps.py |
| +++ b/build/print_python_deps.py |
| @@ -82,7 +82,9 @@ def main(): |
| help='Recursively include all non-test python files ' |
| 'within this directory. May be specified multiple times.') |
| options = parser.parse_args() |
| - sys.path.append(os.path.dirname(options.module)) |
| + # Replace the path entry for print_python_deps.py with the one for the given |
| + # module. |
| + sys.path[0] = os.path.dirname(options.module) |
|
jbudorick
2016/11/10 19:41:02
Do we want anything else in sys.path at all? I'm c
agrieve
2016/11/10 19:45:35
If you clear out sys.path, then normal system impo
jbudorick
2016/11/10 19:49:12
I guess I'm concerned about the case where a modul
|
| imp.load_source('NAME', options.module) |
| paths_set = _ComputePythonDependencies() |