Просмотр исходного кода

Only run gettext in a bash environment

Once the msys2 (m4, autoconf, automake) are fixed
we can use the msys2 recipe.

For now people can use their own bash environment
on Windows by setting the tools.microsoft.bash:path
and tools.microsoft.bash:subsystem when needed.
Jelle Spijker 2 лет назад
Родитель
Сommit
e400f04319
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      conanfile.py

+ 4 - 4
conanfile.py

@@ -276,9 +276,8 @@ class CuraConan(ConanFile):
                 self.requires(req)
 
     def build_requirements(self):
-        if self.settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool):
-            self.tool_requires("msys2/cci.latest")
-        self.tool_requires("gettext/0.21")
+        if self.settings_build.os != "Windows" or self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool):
+            self.tool_requires("gettext/0.21")
 
     def layout(self):
         self.folders.source = "."
@@ -290,7 +289,7 @@ class CuraConan(ConanFile):
         self.cpp.package.resdirs = ["resources", "plugins", "packaging", "pip_requirements"]  # pip_requirements should be the last item in the list
 
     def build(self):
-        if self.settings.os == "Windows":
+        if self.settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool):
             return
             # FIXME: once m4, autoconf, automake are Conan V2 ready self.win_bash = True  # We need gettext, which requires the bash environment
 
@@ -318,6 +317,7 @@ class CuraConan(ConanFile):
                                             icon_path = "'{}'".format(Path(self.source_folder, "packaging", self._um_data()["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"),
                                             entitlements_file = entitlements_file if self.settings.os == "Macos" else "None")
 
+
     def imports(self):
         self.copy("CuraEngine.exe", root_package = "curaengine", src = "@bindirs", dst = "", keep_path = False)
         self.copy("CuraEngine", root_package = "curaengine", src = "@bindirs", dst = "", keep_path = False)