virt-manager/scripts/make_bin_wrapper.py
Pavel Hrdina 0f9d89e069 meson: build and install bin wrappers
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-11-12 23:18:32 +01:00

20 lines
368 B
Python

#!/usr/bin/env python3
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("sharepath")
parser.add_argument("pkgname")
parser.add_argument("filename")
args = parser.parse_args()
print(f"""#!/usr/bin/env python3
import os
import sys
sys.path.insert(0, "{args.sharepath}")
from {args.pkgname} import {args.filename}
{args.filename}.runcli()""")