Closed
Description
Description
I am trying to build the Hiredis package for conan2, but it fails with the error:
ERROR: hiredis/1.1.0: Error in package_info() method, line 95
if self.info.settings.build_type == "Debug":
ConanException: 'self.info' access in 'package_info()' method is forbidden
I pulled the code locally and I think the fix should be:
diff --git a/recipes/hiredis/all/conanfile.py b/recipes/hiredis/all/conanfile.py
index 40c8d8d1f..f2c851704 100644
--- a/recipes/hiredis/all/conanfile.py
+++ b/recipes/hiredis/all/conanfile.py
@@ -92,7 +92,7 @@ class HiredisConan(ConanFile):
if Version(self.version) >= "1.1.0":
if is_msvc(self) and not self.options.shared:
suffix += "_static"
- if self.info.settings.build_type == "Debug":
+ if self.settings.build_type == "Debug":
suffix += "d"
# hiredis
Package and Environment Details
- Package Name/Version: hiredis/1.1.0
- Operating System+version: Linux Ubuntu 22.04
- Compiler+version: GCC 9
- Conan version: conan 2.0.0beta8
- Python version: Python 3.8.10
Conan profile
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux
Steps to reproduce
conan install -r conancenter hiredis/1.1.0@ -pr:b=default -pr:h=default
Logs
Click to expand log
-------- Installing (downloading, building) binaries... --------
hiredis/1.1.0: Already installed!
ERROR: hiredis/1.1.0: Error in package_info() method, line 95
if self.info.settings.build_type == "Debug":
ConanException: 'self.info' access in 'package_info()' method is forbidden