Skip to content

Commit

Permalink
Fix pyinstaller data generation
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Sep 26, 2024
1 parent cee46ae commit ab96236
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
8 changes: 0 additions & 8 deletions conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 4 additions & 7 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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":
Expand Down

0 comments on commit ab96236

Please sign in to comment.