前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >conan入门(十三):conan info 命令的基本用法

conan入门(十三):conan info 命令的基本用法

作者头像
10km
发布2022-04-13 12:12:59
6550
发布2022-04-13 12:12:59
举报
文章被收录于专栏:10km的专栏

conan info 命令的基本用法

conan info命令用于获取有关包的依赖关系图的信息。以thrift为例,如下查询thrift/0.13.0的依赖关系详情:

代码语言:javascript
复制
$ conan info thrift/0.13.0@
boost/1.78.0
    ID: ff68d7a235dfb0d14c40ddef58cc716150cba5f6
    BuildID: None
    Context: host
    Remote: conancenter=https://center.conan.io
    URL: https://github.com/conan-io/conan-center-index
    Homepage: https://www.boost.org
    License: BSL-1.0
    Description: Boost provides free peer-reviewed portable C++ source libraries
    Topics: libraries, cpp
    Provides: boost
    Recipe: Cache
    Binary: Missing
    Binary remote: conancenter
    Creation date: 2022-02-21 16:11:05 UTC
    Required by:
        thrift/0.13.0
    Requires:
        zlib/1.2.11
        bzip2/1.0.8
bzip2/1.0.8
    ID: d9d4b222f9e8db0529bc4a08685d8a80c5b6eadb
    BuildID: None
    Context: host
    Remote: conancenter=https://center.conan.io
    URL: https://github.com/conan-io/conan-center-index
    Homepage: http://www.bzip.org
    License: bzip2-1.0.8
    Description: bzip2 is a free and open-source file compression program that uses the Burrows Wheeler algorithm.
    Topics: bzip2, data-compressor, file-compression
    Provides: bzip2
    Recipe: Cache
    Binary: Download
    Binary remote: conancenter
    Creation date: 2022-01-24 21:45:30 UTC
    Required by:
        boost/1.78.0
libevent/2.1.12
    ID: 00ca1cc2eae480d2d07a9224b72d320c5b3fae8d
    BuildID: None
    Context: host
    Remote: conancenter=https://center.conan.io
    URL: https://github.com/conan-io/conan-center-index
    Homepage: https://github.com/libevent/libevent
    License: BSD-3-Clause
    Description: libevent - an event notification library
    Topics: event, notification, networking, async
    Provides: libevent
    Recipe: Cache
    Binary: Download
    Binary remote: conancenter
    Creation date: 2022-01-23 04:11:00 UTC
    Required by:
        thrift/0.13.0
    Requires:
        openssl/1.1.1m
openssl/1.1.1m
    ID: 63da998e3642b50bee33f4449826b2d623661505
    BuildID: None
    Context: host
    Remote: conancenter=https://center.conan.io
    URL: https://github.com/conan-io/conan-center-index
    Homepage: https://github.com/openssl/openssl
    License: OpenSSL
    Description: A toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols
    Topics: openssl, ssl, tls, encryption, security
    Provides: openssl
    Recipe: Cache
    Binary: Missing
    Binary remote: conancenter
    Creation date: 2022-02-25 20:23:27 UTC
    Required by:
        libevent/2.1.12
        thrift/0.13.0
thrift/0.13.0
    ID: f2d1fdb95bb1e441f36c5f3675d1631dc13bbfbf
    BuildID: None
    Context: host
    Remote: conancenter=https://center.conan.io
    URL: https://github.com/conan-io/conan-center-index
    Homepage: https://github.com/apache/thrift
    License: Apache-2.0
    Description: Thrift is an associated code generation mechanism for RPC
    Topics: thrift, serialization, rpc
    Provides: thrift
    Recipe: Cache
    Binary: Download
    Binary remote: conancenter
    Creation date: 2022-01-12 18:22:36 UTC
    Requires:
        boost/1.78.0
        openssl/1.1.1m
        zlib/1.2.11
        libevent/2.1.12
zlib/1.2.11
    ID: 63da998e3642b50bee33f4449826b2d623661505
    BuildID: None
    Context: host
    Remote: conancenter=https://center.conan.io
    URL: https://github.com/conan-io/conan-center-index
    Homepage: https://zlib.net
    License: Zlib
    Description: A Massively Spiffy Yet Delicately Unobtrusive Compression Library (Also Free, Not to Mention Unencumbered by Patents)
    Topics: zlib, compression
    Provides: zlib
    Recipe: Cache
    Binary: Download
    Binary remote: conancenter
    Creation date: 2022-01-25 09:24:47 UTC
    Required by:
        thrift/0.13.0
        boost/1.78.0

指定--graph参数可以生成依赖关系图

代码语言:javascript
复制
$ conan info thrift/0.13.0@ -r conancenter --graph d:\tmp\info.html

用Chrome浏览器打开生成的info.html,如下:

在这里插入图片描述
在这里插入图片描述

包名末尾的@符号对于搜索特定包很重要。如果不添加@,柯南会将参数解释为模式搜索(模糊匹配),并返回所有匹配thrift/0.13.0的包,并且可能有不同的用户和频道

需要说明的是,上面的示例中我们给conan info命令的第一个参数是个包名thrift/0.13.0@指定要获取 thrift/0.13.0的依赖信息。

如果这个参数是个包含conanfile.py或conanfile.txt的路径,一样是有效的。

比如我们要获取自己的项目的依赖关系图,可以用:

代码语言:javascript
复制
$ conan info.
$ conan info./conanfile.txt
$ conan info./conanfile.py

这里.代表当前文件夹(必须有conanfile.py或conanfile.txt),关于这部分可以参考Conan官方更详细的说明《Inspecting Dependencies》

参考资料

《conan search》

《Inspecting Dependencies》

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022/04/06 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • conan info 命令的基本用法
    • 参考资料
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档