deps: allow for relative package imports in dependency checks would previously run chdir into the Python file which
it is checking before trying to import it.  This caused failures
on modules with relative imports, since they must be imported
under a package namespace.

Modify to instead chdir into the file's parent directory,
so that it will be able to import properly in this case.


Change-Id: I09a2899f3bc61949a4ba6d49e854f27e265b0428
Commit-Ready: Joel Kitching <>
Tested-by: Joel Kitching <>
Reviewed-by: Hung-Te Lin <>
1 file changed