-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyodide xbuildenv search --json
option
#26
Comments
Another thing I noticed is that https://raw.githubusercontent.com/pyodide/pyodide/main/pyodide-cross-build-environments.json notes the existence of a However, Edit: just noticed that we have an |
We already have the structure for this feature in place, so this should be doable. I'll take a look at it. |
Sounds good. Thanks for working on this! |
…ut (#28) ## Description This PR closes #26. It adds a `pyodide xbuildenv search --json` option to print a JSON-based output, along with associated tests. The advantage is that it can be saved to a file, piped to `jq` or shell functions (or any equivalent tools), or simply imported into a Pythonic interface. Additionally, I added a small context manager that does not do anything but stop printing the following lines: ``` Starting new HTTPS connection (1): raw.githubusercontent.com:443 https://raw.githubusercontent.com:443 "GET /pyodide/pyodide/main/pyodide-cross-build-environments.json HTTP/11" 200 917 ``` in the output, because it conflicts with receiving valid JSON. Please let me know if this would be undesirable. If yes, I'll try to work around it so that it gets printed for the non-JSON output (table).
Description
The
pyodide xbuildenv search
command currently prints out a formatted table of values:currently returns
(Side note: is the
pyodide-build
version wrong? It's returning0.26.0 -
for all the versions, and not the latestpyodide-build
version at the time of writing – which is version 0.28.0?)It would be great to get the same output in JSON – for example, something like
Motivation
A JSON-based output would be machine-readable and serialisable into a Python script at runtime. This might be useful for
cibuildwheel
, where currently it is assumed that the Pyodide version and thepyodide-build
version go hand-in-hand (it has to be updated since the unvendoring, which I'm working on).The text was updated successfully, but these errors were encountered: