[question] conan download fetches python_requires
See original GitHub issueHi everybody,
I’ve noticed some issues with conan download in our CI pipeline. A short summary of the pipline with pkgA depends on pkgB:
- the CI is building pkgB because of some code changes. It is uploading the pkg to a temp repo on artifactory, e.g.
conan-libs-temp. - the CI is automatically triggering the build of pkgA to test build against pkgB and tries to fetch the recipe of pkgB from the temp repo to create the build order:
conan download pkgB/some_ver@some_org/snapshot#2ea7ed78fe8fb6c7a40451abd0db25c7 -r conan-libs-temp --recipe
conan graph lock pkgA/some_ver@some_org/stable -pr [...] --remote rmc-conan-libs --build missing
However, conan download fails if pkgB uses python_requires:
ERROR: Error loading conanfile at '[...]/conanfile.py': python_pkg/some_ver@some_org/stable was not found in remote 'conan-libs-temp'
The python_pkg is not available in ‘conan-libs-temp’ because it was not build. The docs state that “requirements of the specified reference will NOT be retrieved”, but this seems not true for python_requires.
What I would expect from the docs is, that conan download only fetches the recipe of pkgB and a subseqent call to conan [graph] lock on pkgA then fetches the python_pkg from a the same remote then pkgA. We are still using conan 1.22, but I don’t think it’s related as the docs didn’t change.
Therefore, my questions are:
-
is this behaviour of
conan downloadexpected? -
if yes: how would then one handle this case in the CI pipeline?
-
I’ve read the CONTRIBUTING guide.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)

Top Related StackOverflow Question
Happy that it is working!
We will use this feedback, and make the
python_requiresmore easily available in graph information in Conan 2.0. Thanks!I’ve created a POC using lockfiles for dependency upload including
python_requires. The pipeline now succeeds. Thanks for the feedback!