From db51dcfa47d66b094a13eb127e09d3134d8dbf1f Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Fri, 2 Feb 2024 16:23:21 +0100 Subject: [PATCH] mdist: Hoist leftover late import From 23d3b98, the meson command is exposed through a function. Therefore, the caveat no longer applies. --- mesonbuild/mdist.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mesonbuild/mdist.py b/mesonbuild/mdist.py index 67442885a389..93ef44eb1609 100644 --- a/mesonbuild/mdist.py +++ b/mesonbuild/mdist.py @@ -21,7 +21,7 @@ from glob import glob from pathlib import Path from mesonbuild.environment import detect_ninja -from mesonbuild.mesonlib import (MesonException, RealPathAction, quiet_git, +from mesonbuild.mesonlib import (MesonException, RealPathAction, get_meson_command, quiet_git, windows_proof_rmtree, setup_vsenv, OptionKey) from mesonbuild.msetup import add_arguments as msetup_argparse from mesonbuild.wrap import wrap @@ -327,9 +327,6 @@ def run(options: argparse.Namespace) -> int: b = build.load(options.wd) need_vsenv = T.cast('bool', b.environment.coredata.get_option(OptionKey('vsenv'))) setup_vsenv(need_vsenv) - # This import must be load delayed, otherwise it will get the default - # value of None. - from mesonbuild.mesonlib import get_meson_command src_root = b.environment.source_dir bld_root = b.environment.build_dir priv_dir = os.path.join(bld_root, 'meson-private')