PyUtils: add Python package dependencies to `acmd cmake depends`
All threads resolved!
acmd.py cmake depends
is able to show link dependencies between packages (see this talk). This MR adds the ability to also show Python dependencies between packages:
apydep.py
has been added that can be run on a source directory and will print/store the Python dependencies between packages as DOT graph. This is analogous to the cmake --graphviz
output. Both include
and import
dependencies are considered. The script parses all Python files in the given source tree and based on the Abstract Syntax Tree (AST) derives the packages dependencies. In release building mode, the resulting packages.py.dot
file is installed into ${AtlasArea}/InstallArea/${BINARY_TAG}
alongside the already existing packages.dot
(for the Athena project the file is ~400kB large and takes ~30s to generate).--py
) has been added to acmd.py cmake depends
to show the Python dependencies for a given package.Since a picture is worth a thousand words... (requires also !39006 (merged))
acmd.py cmake depends --py --dot --legend --clients TriggerD3PDMaker | dot -Tsvg -O