如何使用“conan install”指定每个单独的依赖项来自何处?

问题描述 投票:0回答:1

我正在使用 GitHub 操作运行程序来运行一些脚本。目标是从 conancenter 远程构建依赖项并将其上传到我个人指定的远程。但是,我想从我个人现有的遥控器中收集此依赖项的依赖项,但我需要从 conancenter 遥控器中获取

conanfile.py

到目前为止,为了实现这一目标,

conan remote clean

conan remote add -f my_personal_remote ...
conan remote add conancenter ...

conan install ...

因此,当我执行

conan install
时,这将从我指定的个人遥控器中搜索遥控器,失败,然后从 conancenter 获取
conanfile.py
。然后,它将再次搜索我的所有依赖项,但会在我的个人遥控器上找到它们。

这感觉“有风险”,理想情况下我想要类似的东西,

conan install <My dependency to build> -r conancenter (To fetch the conanfile.py)
conan install <The dependency of my dependency to build> -r my_personal_remote
conan
1个回答
0
投票

使用

conan download
--recipe
标志仅下载食谱,然后使用
conan install
--build=<dependency>
使用食谱并将遥控器指定为
conan install -r ...
似乎可以完成我想要的。

© www.soinside.com 2019 - 2024. All rights reserved.