mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-03 03:54:01 -06:00
Fixed for all the used python packages in venv
CURA-10770
This commit is contained in:
parent
58048598b4
commit
e686baaf92
2 changed files with 21 additions and 4 deletions
16
conanfile.py
16
conanfile.py
|
@ -150,9 +150,14 @@ class CuraConan(ConanFile):
|
||||||
conan_installs.append([dependency.ref.name,dependency.ref.version])
|
conan_installs.append([dependency.ref.name,dependency.ref.version])
|
||||||
|
|
||||||
#list of python installs
|
#list of python installs
|
||||||
import pkg_resources
|
python_ins_cmd = f""" python -c "import pkg_resources; import os; [open(os.path.join("'"{self.recipe_folder}"'", "'"info.txt"'"), "'"a"'").write(s.key+"'","'"+ s.version+"'";"'") for s in pkg_resources.working_set]" """
|
||||||
for package in pkg_resources.working_set:
|
self.run(python_ins_cmd, run_environment= True, env = "conanrun", output=True)
|
||||||
python_installs.append([package.key, package.version])
|
with open(os.path.join(self.recipe_folder, "info.txt"), "r") as f:
|
||||||
|
packages = f.read()
|
||||||
|
package = packages.split(";")
|
||||||
|
for pack in package:
|
||||||
|
python_installs.append(pack.split(","))
|
||||||
|
os.remove(os.path.join(self.recipe_folder, "info.txt"))
|
||||||
|
|
||||||
with open(os.path.join(location, "AboutDialogVersionsList.qml"), "w") as f:
|
with open(os.path.join(location, "AboutDialogVersionsList.qml"), "w") as f:
|
||||||
f.write(cura_version_py.render(
|
f.write(cura_version_py.render(
|
||||||
|
@ -330,7 +335,7 @@ class CuraConan(ConanFile):
|
||||||
vr.generate()
|
vr.generate()
|
||||||
|
|
||||||
self._generate_cura_version(os.path.join(self.source_folder, "cura"))
|
self._generate_cura_version(os.path.join(self.source_folder, "cura"))
|
||||||
self._generate_about_versions(os.path.join(self.source_folder, "resources/qml/Dialogs"))
|
|
||||||
|
|
||||||
if self.options.devtools:
|
if self.options.devtools:
|
||||||
entitlements_file = "'{}'".format(os.path.join(self.source_folder, "packaging", "MacOS", "cura.entitlements"))
|
entitlements_file = "'{}'".format(os.path.join(self.source_folder, "packaging", "MacOS", "cura.entitlements"))
|
||||||
|
@ -349,6 +354,8 @@ class CuraConan(ConanFile):
|
||||||
pot = self.python_requires["translationextractor"].module.ExtractTranslations(self, cpp_info.bindirs[0])
|
pot = self.python_requires["translationextractor"].module.ExtractTranslations(self, cpp_info.bindirs[0])
|
||||||
pot.generate()
|
pot.generate()
|
||||||
|
|
||||||
|
self._generate_about_versions(os.path.join(self.source_folder, "resources/qml/Dialogs"))
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
if self.options.devtools:
|
if self.options.devtools:
|
||||||
if self.settings.os != "Windows" or self.conf.get("tools.microsoft.bash:path", check_type = str):
|
if self.settings.os != "Windows" or self.conf.get("tools.microsoft.bash:path", check_type = str):
|
||||||
|
@ -358,6 +365,7 @@ class CuraConan(ConanFile):
|
||||||
mo_file = mo_file.parent.joinpath("LC_MESSAGES", mo_file.name)
|
mo_file = mo_file.parent.joinpath("LC_MESSAGES", mo_file.name)
|
||||||
mkdir(self, str(unix_path(self, Path(mo_file).parent)))
|
mkdir(self, str(unix_path(self, Path(mo_file).parent)))
|
||||||
cpp_info = self.dependencies["gettext"].cpp_info
|
cpp_info = self.dependencies["gettext"].cpp_info
|
||||||
|
print("we are here /n")
|
||||||
self.run(f"{cpp_info.bindirs[0]}/msgfmt {po_file} -o {mo_file} -f", env="conanbuild", ignore_errors=True)
|
self.run(f"{cpp_info.bindirs[0]}/msgfmt {po_file} -o {mo_file} -f", env="conanbuild", ignore_errors=True)
|
||||||
|
|
||||||
def imports(self):
|
def imports(self):
|
||||||
|
|
|
@ -58,6 +58,15 @@ UM.Dialog
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
UM.I18nCatalog{id: catalog; name: "cura"}
|
UM.I18nCatalog{id: catalog; name: "cura"}
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
projectsList.visible = !projectsList.visible;
|
||||||
|
projectBuildInfoList.visible = !projectBuildInfoList.visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.Label
|
UM.Label
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue