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.
| 74 | |
| 75 | |
| 76 | class 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 | |
| 101 | class _TarCompressionFormat(StrEnum): |
no outgoing calls
no test coverage detected