idl_parser: Add current directory to sys.path
Python 3 doesn't support implicit relative imports. Fix this by adding the current directory to the search path, so all the files can be found. This works on both Python 2 and 3. Traceback (most recent call last): File "../../third_party/blink/renderer/bindings/scripts/collect_idl_files.py", line 14, in <module> import blink_idl_parser File "C:\Google\chromium\src\third_party\blink\renderer\bindings\scripts\blink_idl_parser.py", line 74, in <module> from idl_parser.idl_parser import IDLParser # pylint: disable=import-error File "C:\Google\chromium\src\third_party\blink\renderer\bindings\scripts\..\..\..\..\..\tools\idl_parser\idl_parser.py", line 38, in <module> from idl_lexer import IDLLexer ModuleNotFoundError: No module named 'idl_lexer' Bug: 941669 Change-Id: Ib0e7c88100fd0cc1eee90d252ad8c557e1e25197 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2124475 Commit-Queue: Raul Tambre <raul@tambre.ee> Reviewed-by:Yuki Shiino <yukishiino@chromium.org> Auto-Submit: Raul Tambre <raul@tambre.ee> Cr-Commit-Position: refs/heads/master@{#755073}
Showing
Please register or sign in to comment