Skip to content

[question] Need clarification on python_requires best practices #19580

@duffsterlp

Description

@duffsterlp

What is your question?

Hi conan community! I'm trying to understand the best practices around python_requires including other python_requires.

We're in the process of transitioning from conan 1 to conan 2.

In the conan 1.66 documentation, I see the following:

python_requires can python_requires other recipes too, but this should probably be limited to very few cases, we recommend to use the simplest possible structure.

In the conan 2.X documentation, I see the following:

Even if python-requires can python_requires transitively other python-requires recipes, this is discouraged. Multiple level inheritance and reuse can become quite complex and difficult to manage, it is recommended to keep the hierarchy flat.

We have components that include repoA as a python_requires. It is desired for repoA to include repoB as a python_requires.

Does this conflict with any of the best practices above? I can get into the reasons why we're doing this but first wanted to understand whether the overall flow was recommended or discouraged and why.

For the conan 2 docs, what does Even if python-requires can python_requires transitively other python-requires recipes mean? Does it mean compA using repoA as python_requires using repoB as python_requires using repoC as python_requires or the fewer chain of components?

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