Profiles API¶
警告
此功能是实验性的,可能会有重大更改。 请参阅 Conan 稳定性 部分以获取更多信息。
- class ProfilesAPI(conan_api)¶
- get_default_host()¶
- 返回:
默认的“host”配置文件的路径,无论是在缓存中还是由用户在配置中定义的
- get_default_build()¶
- 返回:
默认的“build”配置文件的路径,无论是在缓存中还是由用户在配置中定义的
- get_profile(profiles, settings=None, options=None, conf=None, cwd=None)¶
计算 Profile,作为聚合所有用户参数的结果,首先它加载“profiles”,按顺序组合它们(最后一个 profile 具有优先级),最后添加单独的设置、选项(优先级高于 profiles)
- get_path(profile, cwd=None, exists=True)¶
- 返回:
给定 profile 名称的解析路径,可能在缓存中或本地,具体取决于“cwd”
- list()¶
列出缓存中的所有 profile 文件 :return: 默认缓存位置中 profile 文件的按字母顺序排列的列表
- static detect()¶
- 返回:
自动检测到的 Profile,对系统设置进行“最佳猜测”