From d5d3982d3c477780916e18af944e3e56210822db Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 4 May 2021 14:57:46 +0200 Subject: [PATCH] build/python/build/project.py: add "lazy" parameter to make_build_path() --- python/build/project.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/build/project.py b/python/build/project.py index 2b8c14723..bf787cf43 100644 --- a/python/build/project.py +++ b/python/build/project.py @@ -72,8 +72,10 @@ class Project: return path - def make_build_path(self, toolchain): + def make_build_path(self, toolchain, lazy=False): path = os.path.join(toolchain.build_path, self.base) + if lazy and os.path.isdir(path): + return path try: shutil.rmtree(path) except FileNotFoundError: