Skip to content

[question] How to get conanfile (conanfile-attributes) from dependencies #19381

@dp-fun

Description

@dp-fun

What is your question?

We are using:
deps = conanfile.dependencies.filter({"build": False, "visible": True,"direct": True})
for key in deps.values():

for the resulting key there are different members:
key.ref , key.options

but there is no possibility to access other attributes from the conanfile like:
dep_version_in_name = getattr(key.ref, "version_in_packagename", False)

is there any way to achieve this?
or is there any way to get the complete conanfile from a dependency?

I know that I could put the Information into the options of the dependency but as we migrated from conan1 it would be nice to get an other way to get the complete conanfile of the dependency (in conan1 this was possible)

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions