gabotechs/dep-tree

Doesn't work on Python project with `src` layout

debakarr opened this issue · 1 comments

Take for example https://github.com/pyca/cryptography

I tried dep-tree-explorer with the following input:

image

That happens because absolute imports are resolved from the root of the project, and the code is nested under src, but absolute imports in that codebase assume that there's no src folder.

You can overcome this using the environment variable PYTHONPATH like this:

export PYTHONPATH=src

and dep-tree will also resolve absolute imports that live in the src folder