Open Florents-Tselai opened 3 weeks ago
There's also a PR already #123318
As a future note:
If this looks appealing, I was wondering if it would make more sense to give some more love to python -m sysconfig
and even promote it as a more reliable replacement to python3-X.X-config
.
This would also mean adding pkg-config
-like flag. Yes, this means duplicating what python3-X.X-config
does, but python -m sysconfig
will always be there, unlike python3-X.X-config
..
Feature or enhancement
Proposal:
Currently
python -m sysconfig
prints only tab-ed textual output which is useful for debugging, but cumbersome to extract speicific information from.I think it makes sense to have a json-formatted output too
python -m sysconfig --json | jq ".variables.prefix"
. With the eventual goal of having to avoidpython -c 'import sysconfig; print(sysconfig.get_*(*)))'?
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/add-python-m-sysconfig-json-option/61918/
Linked PRs