Updated mapping of pyinstaller metadata
Contributes to CURA-9365
@ -58,6 +58,7 @@
|
|||||||
- "pySavitar"
|
- "pySavitar"
|
||||||
- "pyArcus"
|
- "pyArcus"
|
||||||
- "pynest2d"
|
- "pynest2d"
|
||||||
|
- "PyQt6"
|
||||||
- "PyQt6.QtNetwork"
|
- "PyQt6.QtNetwork"
|
||||||
- "PyQt6.sip"
|
- "PyQt6.sip"
|
||||||
- "logging.handlers"
|
- "logging.handlers"
|
||||||
@ -73,6 +74,8 @@
|
|||||||
- "trimesh"
|
- "trimesh"
|
||||||
- "win32ctypes"
|
- "win32ctypes"
|
||||||
- "PyQt6"
|
- "PyQt6"
|
||||||
|
- "PyQt6.QtNetwork"
|
||||||
|
- "PyQt6.sip"
|
||||||
icon:
|
icon:
|
||||||
Windows: "./icons/Cura.ico"
|
Windows: "./icons/Cura.ico"
|
||||||
Macos: "./icons/cura.icns"
|
Macos: "./icons/cura.icns"
|
||||||
@ -137,7 +140,9 @@
|
|||||||
- "pySavitar"
|
- "pySavitar"
|
||||||
- "pyArcus"
|
- "pyArcus"
|
||||||
- "pynest2d"
|
- "pynest2d"
|
||||||
|
- "PyQt6"
|
||||||
- "PyQt6.QtNetwork"
|
- "PyQt6.QtNetwork"
|
||||||
|
- "PyQt6.sip"
|
||||||
- "logging.handlers"
|
- "logging.handlers"
|
||||||
- "zeroconf"
|
- "zeroconf"
|
||||||
- "fcntl"
|
- "fcntl"
|
||||||
@ -151,6 +156,8 @@
|
|||||||
- "trimesh"
|
- "trimesh"
|
||||||
- "win32ctypes"
|
- "win32ctypes"
|
||||||
- "PyQt6"
|
- "PyQt6"
|
||||||
|
- "PyQt6.QtNetwork"
|
||||||
|
- "PyQt6.sip"
|
||||||
icon:
|
icon:
|
||||||
Windows: "./icons/Cura.ico"
|
Windows: "./icons/Cura.ico"
|
||||||
Macos: "./icons/cura.icns"
|
Macos: "./icons/cura.icns"
|
||||||
@ -215,6 +222,7 @@
|
|||||||
- "pySavitar"
|
- "pySavitar"
|
||||||
- "pyArcus"
|
- "pyArcus"
|
||||||
- "pynest2d"
|
- "pynest2d"
|
||||||
|
- "PyQt6"
|
||||||
- "PyQt6.QtNetwork"
|
- "PyQt6.QtNetwork"
|
||||||
- "PyQt6.sip"
|
- "PyQt6.sip"
|
||||||
- "logging.handlers"
|
- "logging.handlers"
|
||||||
@ -230,6 +238,8 @@
|
|||||||
- "trimesh"
|
- "trimesh"
|
||||||
- "win32ctypes"
|
- "win32ctypes"
|
||||||
- "PyQt6"
|
- "PyQt6"
|
||||||
|
- "PyQt6.QtNetwork"
|
||||||
|
- "PyQt6.sip"
|
||||||
icon:
|
icon:
|
||||||
Windows: "./icons/Cura.ico"
|
Windows: "./icons/Cura.ico"
|
||||||
Macos: "./icons/cura.icns"
|
Macos: "./icons/cura.icns"
|
||||||
@ -294,6 +304,7 @@
|
|||||||
- "pySavitar"
|
- "pySavitar"
|
||||||
- "pyArcus"
|
- "pyArcus"
|
||||||
- "pynest2d"
|
- "pynest2d"
|
||||||
|
- "PyQt6"
|
||||||
- "PyQt6.QtNetwork"
|
- "PyQt6.QtNetwork"
|
||||||
- "PyQt6.sip"
|
- "PyQt6.sip"
|
||||||
- "logging.handlers"
|
- "logging.handlers"
|
||||||
@ -309,6 +320,8 @@
|
|||||||
- "trimesh"
|
- "trimesh"
|
||||||
- "win32ctypes"
|
- "win32ctypes"
|
||||||
- "PyQt6"
|
- "PyQt6"
|
||||||
|
- "PyQt6.QtNetwork"
|
||||||
|
- "PyQt6.sip"
|
||||||
icon:
|
icon:
|
||||||
Windows: "./icons/Cura.ico"
|
Windows: "./icons/Cura.ico"
|
||||||
Macos: "./icons/cura.icns"
|
Macos: "./icons/cura.icns"
|
||||||
|
17
conanfile.py
@ -137,7 +137,7 @@ class CuraConan(ConanFile):
|
|||||||
cura_marketplace_root = self._marketplace_root,
|
cura_marketplace_root = self._marketplace_root,
|
||||||
cura_digital_factory_url = self._digital_factory_url))
|
cura_digital_factory_url = self._digital_factory_url))
|
||||||
|
|
||||||
def _generate_pyinstaller_spec(self, location):
|
def _generate_pyinstaller_spec(self, location, entrypoint_location, icon_path):
|
||||||
pyinstaller_metadata = self._um_data(self.version)["pyinstaller"]
|
pyinstaller_metadata = self._um_data(self.version)["pyinstaller"]
|
||||||
datas = []
|
datas = []
|
||||||
for data in pyinstaller_metadata["datas"].values():
|
for data in pyinstaller_metadata["datas"].values():
|
||||||
@ -174,12 +174,12 @@ class CuraConan(ConanFile):
|
|||||||
with open(Path(location, "Ultimaker-Cura.spec"), "w") as f:
|
with open(Path(location, "Ultimaker-Cura.spec"), "w") as f:
|
||||||
f.write(pyinstaller.render(
|
f.write(pyinstaller.render(
|
||||||
name = str(self.options.display_name).replace(" ", "-"),
|
name = str(self.options.display_name).replace(" ", "-"),
|
||||||
entrypoint = os.path.join("..", "..", self._um_data(self.version)["runinfo"]["entrypoint"]),
|
entrypoint = entrypoint_location,
|
||||||
datas = datas,
|
datas = datas,
|
||||||
binaries = binaries,
|
binaries = binaries,
|
||||||
hiddenimports = pyinstaller_metadata["hiddenimports"],
|
hiddenimports = pyinstaller_metadata["hiddenimports"],
|
||||||
collect_all = pyinstaller_metadata["collect_all"],
|
collect_all = pyinstaller_metadata["collect_all"],
|
||||||
icon = os.path.join("..", "..", pyinstaller_metadata["icon"][str(self.settings.os)])
|
icon = icon_path
|
||||||
))
|
))
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
@ -206,14 +206,16 @@ class CuraConan(ConanFile):
|
|||||||
|
|
||||||
self.cpp.package.libdirs = [os.path.join("site-packages", "cura")]
|
self.cpp.package.libdirs = [os.path.join("site-packages", "cura")]
|
||||||
self.cpp.package.bindirs = ["bin"]
|
self.cpp.package.bindirs = ["bin"]
|
||||||
self.cpp.package.resdirs = ["resources", "plugins", "pip_requirements"] # pip_requirements should be the last item in the list
|
self.cpp.package.resdirs = ["resources", "plugins", "packaging", "pip_requirements"] # pip_requirements should be the last item in the list
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
vr = VirtualRunEnv(self)
|
vr = VirtualRunEnv(self)
|
||||||
vr.generate()
|
vr.generate()
|
||||||
|
|
||||||
if self.options.devtools:
|
if self.options.devtools:
|
||||||
self._generate_pyinstaller_spec(self.generators_folder)
|
self._generate_pyinstaller_spec(self.generators_folder,
|
||||||
|
os.path.join(self.source_folder, self._um_data(self.version)["runinfo"]["entrypoint"]),
|
||||||
|
os.path.join(self.source_folder, "packaging", self._um_data(self.version)["pyinstaller"]["icon"][str(self.settings.os)]))
|
||||||
|
|
||||||
def imports(self):
|
def imports(self):
|
||||||
self.copy("CuraEngine.exe", root_package = "curaengine", src = "@bindirs", dst = "", keep_path = False)
|
self.copy("CuraEngine.exe", root_package = "curaengine", src = "@bindirs", dst = "", keep_path = False)
|
||||||
@ -287,7 +289,9 @@ class CuraConan(ConanFile):
|
|||||||
self.copy("*.txt", src = self.cpp_info.resdirs[-1], dst = self._base_dir.joinpath("pip_requirements"))
|
self.copy("*.txt", src = self.cpp_info.resdirs[-1], dst = self._base_dir.joinpath("pip_requirements"))
|
||||||
|
|
||||||
self._generate_cura_version(Path(self._site_packages, "cura"))
|
self._generate_cura_version(Path(self._site_packages, "cura"))
|
||||||
self._generate_pyinstaller_spec(self._base_dir)
|
self._generate_pyinstaller_spec(self._base_dir,
|
||||||
|
os.path.join(self.cpp_info.bindirs[0], self._um_data(self.version)["runinfo"]["entrypoint"]),
|
||||||
|
os.path.join(self.cpp_info.resdirs[2], self._um_data(self.version)["pyinstaller"]["icon"][str(self.settings.os)]))
|
||||||
|
|
||||||
|
|
||||||
def package(self):
|
def package(self):
|
||||||
@ -296,6 +300,7 @@ class CuraConan(ConanFile):
|
|||||||
self.copy("*", src = "resources", dst = self.cpp.package.resdirs[0])
|
self.copy("*", src = "resources", dst = self.cpp.package.resdirs[0])
|
||||||
self.copy("*", src = "plugins", dst = self.cpp.package.resdirs[1])
|
self.copy("*", src = "plugins", dst = self.cpp.package.resdirs[1])
|
||||||
self.copy("requirement*.txt", src = ".", dst = self.cpp.package.resdirs[-1])
|
self.copy("requirement*.txt", src = ".", dst = self.cpp.package.resdirs[-1])
|
||||||
|
self.copy("*", src = "packaging", dst = self.cpp.package.resdirs[2])
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.user_info.pip_requirements = "requirements.txt"
|
self.user_info.pip_requirements = "requirements.txt"
|
||||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |