From de12ba8998a041e587bcebedfa73e663cbb7251a Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 20 Feb 2024 08:53:26 +0100 Subject: [PATCH] match on OS for extension Co-authored-by: Casper Lamboo --- conanfile.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/conanfile.py b/conanfile.py index c54fc9f735..d20378d7e7 100644 --- a/conanfile.py +++ b/conanfile.py @@ -212,12 +212,13 @@ def build(self): self.run(f"sentry-cli --auth-token {os.environ['SENTRY_TOKEN']} releases finalize -o {sentry_org} -p {sentry_project} {self.version}") def package(self): - if self.settings.os == "Windows": - ext = ".exe" - elif self.settings.os == "Emscripten": - ext = ".js" - else: - ext = "" + match self.setting.os: + case "Windows": + ext = ".exe" + case "Emscripten": + ext = ".js" + case other: + ext = "" copy(self, f"CuraEngine{ext}", src=self.build_folder, dst=path.join(self.package_folder, "bin")) copy(self, f"*.d.ts", src=self.build_folder, dst=path.join(self.package_folder, "bin")) copy(self, f"_CuraEngine.*", src=self.build_folder, dst=path.join(self.package_folder, "lib"))