From 1131ace87843995cdc3a70127e75c69599b722fd Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 4 Sep 2024 13:01:56 +0200 Subject: [PATCH] (#25131) [premake] Build with Conan 1.x again * Re-enable Conan 1.x build Signed-off-by: Uilian Ries * Remove unused import Signed-off-by: Uilian Ries --------- Signed-off-by: Uilian Ries --- recipes/premake/5.x/conanfile.py | 6 +----- recipes/premake/5.x/test_package/conanfile.py | 8 +++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/recipes/premake/5.x/conanfile.py b/recipes/premake/5.x/conanfile.py index d4fa461153f3c..0a761c061731a 100644 --- a/recipes/premake/5.x/conanfile.py +++ b/recipes/premake/5.x/conanfile.py @@ -3,7 +3,7 @@ import re import shutil -from conan import ConanFile, conan_version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, replace_in_file @@ -55,10 +55,6 @@ def requirements(self): def validate(self): if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): raise ConanInvalidConfiguration("Cross-building not implemented") - if conan_version.major == 1 and self.settings.build_type == "Debug": - # This configuration fails without any error messages in C3I. - # https://c3i.jfrog.io/artifactory/misc/logs/pr/18844/15-linux-clang/premake/5.0.0-alpha15/ - raise ConanInvalidConfiguration("Debug build not supported with Conan 1.x") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/premake/5.x/test_package/conanfile.py b/recipes/premake/5.x/test_package/conanfile.py index d2d508976967c..0cbf9e48678a6 100644 --- a/recipes/premake/5.x/test_package/conanfile.py +++ b/recipes/premake/5.x/test_package/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.cmake import cmake_layout +from conan.tools.build import can_run class TestPackageConan(ConanFile): @@ -10,8 +10,6 @@ class TestPackageConan(ConanFile): def build_requirements(self): self.tool_requires(self.tested_reference_str) - def layout(self): - cmake_layout(self) - def test(self): - self.run("premake5 --version") + if can_run(self): + self.run("premake5 --version")