From b69eb0180e038edcbc945b1c611c6d0dafe75e96 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Wed, 7 Sep 2022 10:34:04 +0200 Subject: [PATCH] Use conf to obtain configuration Contributes to CURA-8831 --- conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conanfile.py b/conanfile.py index 17cd0260a6..981e285bef 100644 --- a/conanfile.py +++ b/conanfile.py @@ -149,7 +149,7 @@ class CuraConan(ConanFile): with open(Path(__file__).parent.joinpath("CuraVersion.py.jinja"), "r") as f: cura_version_py = Template(f.read()) - cura_version = self.conf_info.get("user.cura:version", default = self.version, check_type = str) + cura_version = self.conf.get("user.cura:version", default = self.version, check_type = str) if self.options.internal: version = Version(cura_version) cura_version = f"{version.major}.{version.minor}.{version.patch}-{version.prerelease.replace('+', '+internal_')}" @@ -220,7 +220,7 @@ class CuraConan(ConanFile): with open(Path(__file__).parent.joinpath("Ultimaker-Cura.spec.jinja"), "r") as f: pyinstaller = Template(f.read()) - version = self.conf_info.get("user.cura:version", default = self.version, check_type = str) + version = self.conf.get("user.cura:version", default = self.version, check_type = str) cura_version = Version(version) with open(Path(location, "Ultimaker-Cura.spec"), "w") as f: @@ -255,7 +255,7 @@ class CuraConan(ConanFile): self.options["cpython"].shared = True def validate(self): - version = self.conf_info.get("user.cura:version", default = self.version, check_type = str) + version = self.conf.get("user.cura:version", default = self.version, check_type = str) if version and Version(version) <= Version("4"): raise ConanInvalidConfiguration("Only versions 5+ are support") @@ -383,7 +383,7 @@ class CuraConan(ConanFile): self.copy("*.txt", src = self.cpp_info.resdirs[-1], dst = self._base_dir.joinpath("pip_requirements")) # Generate the GitHub Action version info Environment - version = self.conf_info.get("user.cura:version", default = self.version, check_type = str) + version = self.conf.get("user.cura:version", default = self.version, check_type = str) cura_version = Version(version) env_prefix = "Env:" if self.settings.os == "Windows" else "" activate_github_actions_version_env = Template(r"""echo "CURA_VERSION_MAJOR={{ cura_version_major }}" >> ${{ env_prefix }}GITHUB_ENV