MCPcopy Create free account
hub / github.com/kivy/python-for-android / write_build_options

Method write_build_options

pythonforandroid/recipe.py:1547–1565  ·  view source on GitHub ↗

Writes python dict to meson config file

(self, arch)

Source from the content-addressed store, hash-verified

1545 }
1546
1547 def write_build_options(self, arch):
1548 """Writes python dict to meson config file"""
1549 option_data = ""
1550 build_options = self.get_recipe_meson_options(arch)
1551 for key in build_options.keys():
1552 data_chunk = "[{}]".format(key)
1553 for subkey in build_options[key].keys():
1554 value = build_options[key][subkey]
1555 if isinstance(value, int):
1556 value = str(value)
1557 elif isinstance(value, str):
1558 value = "'{}'".format(value)
1559 elif isinstance(value, bool):
1560 value = "true" if value else "false"
1561 elif isinstance(value, list):
1562 value = "['" + "', '".join(value) + "']"
1563 data_chunk += "\n" + subkey + " = " + value
1564 option_data += data_chunk + "\n\n"
1565 return option_data
1566
1567 def ensure_args(self, *args):
1568 for arg in args:

Callers 1

build_archMethod · 0.95

Calls 2

formatMethod · 0.80

Tested by

no test coverage detected