当前位置: 首页>>代码示例>>Python>>正文


Python Values.loads方法代码示例

本文整理汇总了Python中conans.model.values.Values.loads方法的典型用法代码示例。如果您正苦于以下问题:Python Values.loads方法的具体用法?Python Values.loads怎么用?Python Values.loads使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在conans.model.values.Values的用法示例。


在下文中一共展示了Values.loads方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: loads

# 需要导入模块: from conans.model.values import Values [as 别名]
# 或者: from conans.model.values.Values import loads [as 别名]
    def loads(text):
        parser = ConfigParser(text, ["settings", "full_settings", "options", "full_options",
                                     "requires", "full_requires"])

        result = ConanInfo()
        result.settings = Values.loads(parser.settings)
        result.full_settings = Values.loads(parser.full_settings)
        result.options = OptionsValues.loads(parser.options)
        result.full_options = OptionsValues.loads(parser.full_options)
        result.full_requires = RequirementsList.loads(parser.full_requires)
        result.requires = RequirementsInfo(result.full_requires)
        # TODO: Missing handling paring of requires, but not necessary now
        return result
开发者ID:KindDragon,项目名称:conan,代码行数:15,代码来源:info.py

示例2: loads

# 需要导入模块: from conans.model.values import Values [as 别名]
# 或者: from conans.model.values.Values import loads [as 别名]
    def loads(text):
        parser = ConfigParser(text, ["settings", "full_settings", "options", "full_options",
                                     "requires", "full_requires", "scope", "recipe_hash",
                                     "env"], raise_unexpected_field=False)
        result = ConanInfo()
        result.settings = Values.loads(parser.settings)
        result.full_settings = Values.loads(parser.full_settings)
        result.options = OptionsValues.loads(parser.options)
        result.full_options = OptionsValues.loads(parser.full_options)
        result.full_requires = RequirementsList.loads(parser.full_requires)
        result.requires = RequirementsInfo(result.full_requires)
        result.recipe_hash = parser.recipe_hash or None

        # TODO: Missing handling paring of requires, but not necessary now
        result.env_values = EnvValues.loads(parser.env)
        return result
开发者ID:19317362,项目名称:conan,代码行数:18,代码来源:info.py

示例3: _loader

# 需要导入模块: from conans.model.values import Values [as 别名]
# 或者: from conans.model.values.Values import loads [as 别名]
    def _loader(self, current_path=None, user_settings_values=None, user_options_values=None):
        # The disk settings definition, already including the default disk values
        settings = self._paths.settings
        options = OptionsValues()
        if current_path:
            conan_info_path = os.path.join(current_path, CONANINFO)
            if os.path.exists(conan_info_path):
                existing_info = ConanInfo.load_file(conan_info_path)
                settings.values = existing_info.full_settings
                options = existing_info.full_options  # Take existing options from conaninfo.txt

        if user_settings_values:
            # FIXME: CHapuza
            aux_values = Values.loads("\n".join(user_settings_values))
            settings.values = aux_values

        if user_options_values is not None:  # Install will pass an empty list []
            # Install OVERWRITES options, existing options in CONANINFO are not taken
            # into account, just those from CONANFILE + user command line
            options = OptionsValues.loads("\n".join(user_options_values))

        return ConanFileLoader(self._user_io.out, self._runner, settings, options=options)
开发者ID:davidsanfal,项目名称:conan,代码行数:24,代码来源:manager.py

示例4: setUp

# 需要导入模块: from conans.model.values import Values [as 别名]
# 或者: from conans.model.values.Values import loads [as 别名]
 def setUp(self):
     package_options = PackageOptions.loads("""{static: [True, False],
     optimized: [2, 3, 4],
     path: ANY}""")
     package_options.values = Values.loads("static=True\noptimized=3\npath=NOTDEF")
     self.sut = Options(package_options)
开发者ID:JustgeekDE,项目名称:conan,代码行数:8,代码来源:options_test.py


注:本文中的conans.model.values.Values.loads方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。