Fix Python imported modules depfile generation

Some Python scripts incorrectly reported no python module deps, for
example a manual run of build/android/gn/zip.py would create an empty
depfile (without even a build_utils.py entry).

GetPythonDependencies assumed that CHROMIUM_SRC is an absolute path,
turns out that depends on details of how build_utils.py is imported.
If it happened to be relative, all modules would be omitted from the
depfile as "system" modules, as they did not match CHROMIUM_SRC. Fix by
using DIR_SOURCE_ROOT which is absolute (and assert that it is).

R=cjhopman@chromium.org, agrieve@chromium.org
BUG=359249

Review URL: https://codereview.chromium.org/1412793012

Cr-Commit-Position: refs/heads/master@{#357246}


CrOS-Libchrome-Original-Commit: 2e3ee5b02663f63194484fe5c4ec92c39a005617
1 file changed
tree: 3dc633944f43491aab59b58f26b829b548e62868
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/