Projects like cibuildwheel are currently calling
xbuildenvs_info_str = call(
"pyodide",
"xbuildenv",
"search",
"--json",
"--all",
env=env,
cwd=CIBW_CACHE_PATH,
capture_stdout=True,
).strip()
in pypa/cibuildwheel#2002, which was first added in #26.
@hoodmane says:
Maybe we should add a Python API for this to pyodide-build.
@agriyakhetarpal says:
Yes, we have a MetadataView class that's used for this: https://github.com/pyodide/pyodide-build/blob/7126c5f1bd56ed7f40ce29cbcbe588267a42434c/pyodide_build/views.py
See pypa/cibuildwheel#2002 (comment)