conan-io / conan-extensions

Some extra Conan commands for different purposes, like artifactory tasks, conan-center-index, etc
MIT License
30 stars 27 forks source link

[question] python_requires and build infos #73

Open dazze1812 opened 1 year ago

dazze1812 commented 1 year ago

What is your question?

Hi! the dependency graph of a python_require package does not include any modules. There is only node "0".

{
    "graph": {
        "nodes": {
            "0": {
                "ref": "conanfile",
                "id": "0",
                "recipe": "Cli",
                ...
            }
        },
        "root": {
            "0": "None"
        },
        "overrides": {},
        "resolved_ranges": {}
    }
}

This results in a build info (created with "conan art:build-info create") not containing any modules.

When uploading the build info to Artifactory, the build is not linked to the package files in the repository and it is not possible to promote such a build.

How can I promote builds of python_require packages in Artifactory?

Have you read the CONTRIBUTING guide?

memsharded commented 1 year ago

Hi @dazze1812

Thanks for your question.

The observation is correct. The python_requires are not regular packages, they do not have binaries, and they do not constitute a "node" in the dependency graph (it is a C/C++ packages dependency graph).

We have recently added full information about python_requires in the serialized graph.json. So I suspect that what you are seeing might be a gap in the actual conan art:build-info command, not in Conan itself, lets move this ticket to the conan extensions repo where this belongs.

memsharded commented 1 year ago

I am having a look, indeed the extension is not modeling python_requires. There is a gap in the serialization of python_requires, that will need to be added in next 2.0.X, I'll manage that

memsharded commented 1 year ago

Implemented https://github.com/conan-io/conan/pull/14886 for next Conan 2.0.14

memsharded commented 1 year ago

The fix for Conan client was merged, started to fix the buildInfo command in https://github.com/conan-io/conan-extensions/pull/74