libvirt/scripts/meson-dist.py
Michal Privoznik bc70aa1df3 scripts/meson-dist.py: Get builddir from env too
When meson runs a dist script it sets both MESON_BUILD_ROOT and
MESON_DIST_ROOT envvars [1]. But for some reason, we took the
former as an argument and obtained the latter via env. Well,
obtain both via env.

1: https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonadd_dist_script
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-05-02 14:33:20 +02:00

14 lines
293 B
Python
Executable File

#!/usr/bin/env python3
import os
import shutil
import sys
file_name = sys.argv[1]
meson_build_root = os.environ['MESON_BUILD_ROOT']
meson_dist_root = os.environ['MESON_DIST_ROOT']
shutil.copy(os.path.join(meson_build_root, file_name),
os.path.join(meson_dist_root, file_name))