From cf836c29cb47ffb784cd965f50508fa415903b36 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 30 Oct 2024 08:45:58 +0100 Subject: [PATCH] Build: Outright remove the unwanted binaries, just to be sure. This is needed on Windows at the moment, which doesn't actually parse that file, but does execute the method. part of CURA-12229 --- conanfile.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/conanfile.py b/conanfile.py index d684e10ea4..d2ecd6e3e4 100644 --- a/conanfile.py +++ b/conanfile.py @@ -285,11 +285,13 @@ class CuraConan(ConanFile): blacklist = pyinstaller_metadata["blacklist"] filtered_binaries = [b for b in binaries if not any([all([(part in b[0].lower()) for part in parts]) for parts in blacklist])] - # TEMP: print to make sure -- remove this before merge - print("specifically don't include:") - print(set(binaries) - set(filtered_binaries)) - print("=== === ===") + # In case the installer isn't actually pyinstaller (Windows at the moment), outright remove the offending files: + specifically_delete = set(binaries) - set(filtered_binaries) + for (unwanted_path, _) in specifically_delete: + print(f"delete: {unwanted_path}") + os.remove(unwanted_path) + # Write the actual file: with open(os.path.join(location, "UltiMaker-Cura.spec"), "w") as f: f.write(pyinstaller.render( name = str(self.options.display_name).replace(" ", "-"),