From c15446d424010b1d74ce34ed2cf53045b922fbfe Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Fri, 14 Jun 2024 11:33:54 -0500 Subject: [PATCH] * remove meson --wipe command --- pymake/pymake_base.py | 4 +++- pymake/pymake_build_apps.py | 3 ++- pymake/utils/_meson_build.py | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pymake/pymake_base.py b/pymake/pymake_base.py index 11b590c..b16c212 100644 --- a/pymake/pymake_base.py +++ b/pymake/pymake_base.py @@ -183,9 +183,11 @@ def main( if meson: if not inplace: inplace = True + makeclean = False print( f"Using meson to build {os.path.basename(target)}, " - + "resetting inplace to True" + + "resetting inplace to True and " + + "makeclean to False." ) if srcdir is not None and target is not None: diff --git a/pymake/pymake_build_apps.py b/pymake/pymake_build_apps.py index 39f2cf7..bac0a4d 100644 --- a/pymake/pymake_build_apps.py +++ b/pymake/pymake_build_apps.py @@ -127,7 +127,8 @@ def build_apps( shutil.rmtree(pth) # set object to clean after each build - pmobj.makeclean = True + if not pmobj.meson: + pmobj.makeclean = True # reset variables based on passed args if download_dir is not None: diff --git a/pymake/utils/_meson_build.py b/pymake/utils/_meson_build.py index 749e36a..d64c931 100644 --- a/pymake/utils/_meson_build.py +++ b/pymake/utils/_meson_build.py @@ -1,4 +1,5 @@ import os +import shutil from contextlib import contextmanager from pathlib import Path @@ -197,7 +198,8 @@ def meson_setup( command_list.append(f"--bindir={libdir}") if os.path.isdir(build_dir): - command_list.append("--wipe") + shutil.rmtree(build_dir) + # command_list.append("--wipe") command = " ".join(command_list) print(f"\n{command}\n")