On Thu, 6 Mar 2025 17:22:47 -0500 Willem de Bruijn wrote:
- def lpath(self, path):
"""
Similar to rpath, but for files in net/lib TARGET.
"""
lib_dir = (Path(__file__).parent / "../../../../net/lib").resolve()
return (lib_dir / path).as_posix()
small nit that one letter acronyms are not the most self describing ;) I would initially read this as local path
The other option that came to mind was to have one helper called path() and pass rel=CONST to it. For example:
prog = cfg.path("xdp_dummy.bpf.o", rel=cfg.NET_LIB)
Thinking about it now we could also store dir directly, which is probably most "Pythonic"?
prog = cfg.net_lib_dir / "xdp_dummy.bpf.o"
Thoughts?