本文整理汇总了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
示例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
示例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)
示例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)