pyodide / pyodide-build

Tool for building packages targeting Pyodide
Mozilla Public License 2.0
5 stars 5 forks source link

Access `sysconfig` paths through `pyodide config` CLI #14

Open agriyakhetarpal opened 1 month ago

agriyakhetarpal commented 1 month ago

Description

This PR is a re-do of https://github.com/pyodide/pyodide/pull/4947, which aimed to add the include directory containing the Python interpreter headers. This PR goes one step further and adds a way to access all of the paths listed under sysconfig.get_paths(). These paths are available in the default configuration values under pyodide config list and are accessible through pyodide config get <variable name>, say pyodide config get pyodide_sysconfig_include. These contain the pyodide_sysconfig prefix to prevent any potential conflicts with any of the other computed variables.

[!NOTE] Please refer to the description for the PR above for the reasoning behind this change.

Checklist

agriyakhetarpal commented 1 month ago

Personally, I'm not a fan of the pyodide_sysconfig prefix, but I think it helps avoid us being ambiguous. Also, I think python_sysconfig would be a better prefix instead of pyodide_sysconfig – this is ready for review, @ryanking13 (I don't have permissions to request reviews on this repository)