[PATCH v2 1/7] build: output a dependency log in build directory
Burakov, Anatoly
anatoly.burakov at intel.com
Mon Sep 2 16:34:34 CEST 2024
On 8/2/2024 2:44 PM, Bruce Richardson wrote:
> As meson processes our DPDK source tree it manages dependencies
> specified by each individual driver. To enable future analysis of the
> dependency links between components, log the dependencies of each DPDK
> component as it gets processed. This could potentially allow other tools
> to automatically enable or disable components based on the desired end
> components to be built, e.g. if the user requests net/ice, ensure that
> common/iavf is also enabled in the drivers.
>
> The output file produced is in "dot" or "graphviz" format, which allows
> producing a graphical representation of the DPDK dependency tree if so
> desired. For example: "dot -Tpng -O build/deps.dot" to produce the
> image file "build/deps.dot.png".
>
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
>
> ---
<snip>
> +try:
> + contents = file_to_list(depsfile)
> +except FileNotFoundError:
> + contents = ['digraph {\n', '}\n']
> +
> +component = sys.argv[1]
> +if len(sys.argv) > 2:
> + contents[-1] = f'"{component}" -> {{ "{"\", \"".join(sys.argv[2:])}" }}\n'
This is invalid syntax prior to Python 3.12. You're doing escaped quotes
("\", \"") inside a f-string block ({}). My machine has Python 3.9 and
this breaks the script.
--
Thanks,
Anatoly
More information about the dev
mailing list