MCPcopy Create free account
hub / github.com/F-Stack/f-stack / MesonArgs

Class MesonArgs

dpdk/dts/framework/utils.py:76–98  ·  view source on GitHub ↗

Aggregate the arguments needed to build DPDK: default_library: Default library type, Meson allows "shared", "static" and "both". Defaults to None, in which case the argument won't be used. Keyword arguments: The arguments found in meson_options.txt in root DPDK directory.

Source from the content-addressed store, hash-verified

74
75
76class MesonArgs(object):
77 """
78 Aggregate the arguments needed to build DPDK:
79 default_library: Default library type, Meson allows "shared", "static" and "both".
80 Defaults to None, in which case the argument won't be used.
81 Keyword arguments: The arguments found in meson_options.txt in root DPDK directory.
82 Do not use -D with them, for example:
83 meson_args = MesonArgs(enable_kmods=True).
84 """
85
86 _default_library: str
87
88 def __init__(self, default_library: str | None = None, **dpdk_args: str | bool):
89 self._default_library = f"--default-library={default_library}" if default_library else ""
90 self._dpdk_args = " ".join(
91 (
92 f"-D{dpdk_arg_name}={dpdk_arg_value}"
93 for dpdk_arg_name, dpdk_arg_value in dpdk_args.items()
94 )
95 )
96
97 def __str__(self) -> str:
98 return " ".join(f"{self._default_library} {self._dpdk_args}".split())
99
100
101class _TarCompressionFormat(StrEnum):

Callers 2

_build_dpdkMethod · 0.90
build_dpdk_appMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected