PyUtils: add Python package dependencies to `acmd cmake depends`
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:
- A new script
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 thecmake --graphviz
output. Bothinclude
andimport
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 resultingpackages.py.dot
file is installed into${AtlasArea}/InstallArea/${BINARY_TAG}
alongside the already existingpackages.dot
(for the Athena project the file is ~400kB large and takes ~30s to generate). - A new command line option (
--py
) has been added toacmd.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
Edited by Frank Winklmeier