From ab96236a8f16014706da86c3a5715b85fa784929 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 26 Sep 2024 16:38:23 +0200 Subject: [PATCH] Fix pyinstaller data generation --- conandata.yml | 8 -------- conanfile.py | 11 ++++------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/conandata.yml b/conandata.yml index 8d37d40bca0..d1fd19af9f9 100644 --- a/conandata.yml +++ b/conandata.yml @@ -86,14 +86,6 @@ pyinstaller: package: "fdm_materials" src: "res/resources/materials" dst: "share/cura/resources/materials" - tcl: - package: "tcl" - src: "lib/tcl8.6" - dst: "tcl" - tk: - package: "tk" - src: "lib/tk8.6" - dst: "tk" binaries: curaengine: package: "curaengine" diff --git a/conanfile.py b/conanfile.py index 21d55d4d2c1..21a8c808434 100644 --- a/conanfile.py +++ b/conanfile.py @@ -199,14 +199,11 @@ def _generate_pyinstaller_spec(self, location, entrypoint_location, icon_path, e if "package" in data: # get the paths from conan package if data["package"] == self.name: - if self.in_local_cache: - src_path = str(Path(self.package_folder, data["src"])) - else: - src_path = str(Path(self.source_folder, data["src"])) + src_path = str(Path(self.source_folder, data["src"])) else: - if data["package"] not in self.deps_cpp_info.deps: + if data["package"] not in self.dependencies: continue - src_path = os.path.join(self.deps_cpp_info[data["package"]].rootpath, data["src"]) + src_path = os.path.join(self.dependencies[data["package"]].package_folder, data["src"]) elif "root" in data: # get the paths relative from the install folder src_path = os.path.join(self.install_folder, data["root"], data["src"]) else: @@ -217,7 +214,7 @@ def _generate_pyinstaller_spec(self, location, entrypoint_location, icon_path, e binaries = [] for binary in pyinstaller_metadata["binaries"].values(): if "package" in binary: # get the paths from conan package - src_path = os.path.join(self.deps_cpp_info[binary["package"]].rootpath, binary["src"]) + src_path = os.path.join(self.dependencies[binary["package"]].package_folder, binary["src"]) elif "root" in binary: # get the paths relative from the sourcefolder src_path = str(Path(self.source_folder, binary["root"], binary["src"])) if self.settings.os == "Windows":