cpython
cpython copied to clipboard
gh-98718: add sys.build_prefix
Alternative to #98719, but exporting sys.build_prefix
.
- Issue: gh-98718
I wonder if, rather than plumbing this the whole way through, we can simply assign it to the sys module in getpath.py? There's no real value in making this configurable, and honestly I'd rather remove or fix anything that requires this.
Yes, I think that makes sense.
By configurable you are referring to setting it when embedding, right? I was under the impression we needed further changes to make that actually work.
By configurable you are referring to setting it when embedding, right? I was under the impression we needed further changes to make that actually work.
Just needs to be put into PyConfig
and set up to be cleared/copied (as you've done). But on second thoughts, you're not going to be able to set the sys module directly here anyway, so probably it needs to go back into PyConfig
at this stage.
If we're to go ahead with this, I'd make the PyConfig
field private (leading underscore). Or if we can come up with a better way to set up the sys module from within getpath.py, I'd like that more.