Skip to content

Commit 0000ba3

Browse files
committed
Use gettext tools in path (experimental)
1 parent 09be772 commit 0000ba3

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

conanfile.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CuraConan(ConanFile):
2525
exports = "LICENSE*", "*.jinja"
2626
settings = "os", "compiler", "build_type", "arch"
2727
generators = "VirtualPythonEnv"
28-
tool_requires = "gettext/0.21"
28+
tool_requires = "gettext/0.22.5"
2929

3030
# FIXME: Remove specific branch once merged to main
3131
python_requires = "translationextractor/[>=2.2.0]@ultimaker/cura_11622"
@@ -348,9 +348,7 @@ def generate(self):
348348
vb = VirtualBuildEnv(self)
349349
vb.generate()
350350

351-
# # FIXME: once m4, autoconf, automake are Conan V2 ready use self.win_bash and add gettext as base tool_requirement
352-
cpp_info = self.dependencies["gettext"].cpp_info
353-
pot = self.python_requires["translationextractor"].module.ExtractTranslations(self, cpp_info.bindirs[0])
351+
pot = self.python_requires["translationextractor"].module.ExtractTranslations(self)
354352
pot.generate()
355353

356354
def build(self):
@@ -362,8 +360,7 @@ def build(self):
362360
mo_file = Path(self.build_folder, po_file.with_suffix('.mo').relative_to(self.source_folder))
363361
mo_file = mo_file.parent.joinpath("LC_MESSAGES", mo_file.name)
364362
mkdir(self, str(unix_path(self, Path(mo_file).parent)))
365-
cpp_info = self.dependencies["gettext"].cpp_info
366-
self.run(f"{cpp_info.bindirs[0]}/msgfmt {po_file} -o {mo_file} -f", env="conanbuild", ignore_errors=True)
363+
self.run(f"msgfmt {po_file} -o {mo_file} -f", env="conanbuild")
367364

368365
def deploy(self):
369366
''' Note: this deploy step is actually used to prepare for building a Cura distribution with pyinstaller, which is not

0 commit comments

Comments
 (0)