Search code examples
conan

Conan: How to access package id hash or generate it in build step of conanfile.py?


How to access or generate package id hash in conan in the build step of conanfile.py? I want to pass it inside cmake to report on -v the full version of my program including the hash.


Solution

  • This is a known question in Conan Issues, please take a look there: https://github.com/conan-io/conan/issues/7100

    Basically, you can access it by:

    packageid = self.info.package_id()