-
Notifications
You must be signed in to change notification settings - Fork 17
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
Patch pybi sysconfig to workaround distutils/setuptools bugs relocation bugs? #18
Comments
As part of the unpacking process, PyPy can call
Additionally, PyPy extends the command line interface of
|
PyPy has the luxury of shipping its own stdlib, so it can be lazy about patching the upstream (CPython) stdlib with changes it made. Conda does not have that luxury, so it has a patching mechanism to download the CPython sources and patch them. Maybe posy could patch pybi where needed. |
Oh yeah, I was wondering what conda did! Looks like it's.... here? or maybe here? Maybe I should just look at the package instead of deciphering build scripts. ...oh fun, latest miniconda installer gives errors on Ubuntu because it has bashisms in a
It also has a symlink from
Well... anyway... it looks like they rely on conda's trick where it can rewrite files after installing to substitute in the installation path. Which is cool and all, but it would be Extremely Nice™ if pybis could be relocatable without that extra step, and it seems pretty viable given that |
I'd have to look up the details, but basically that's a disgusting hack that became necessary for reasons™ after python's minor version gained a second digit. |
There are two parts to this issue:
The regeneration is available when calling It seems like the viable alternatives for patching sysconfig.py are to submit an upstream PR (problematic for older Pythons) or by some magic done when packaging. |
Possibly relevant: python/cpython#99942 |
Currently, distutils/setuptools are buggy when run inside a relocatable Python. For example, pypa/setuptools#3786, though there may be others.
Ultimately we should fix distutils/setuptools. And as a temporary workaround, posy's PEP 517 frontend currently monkeypatches distutils to paper over that specific bug. But in the discourse thread, @mattip mentioned another possible workaround: changing the
_sysconfig_*.py
files that are shipped inside the relocatable python distributions. This is attractive because it would work for anyone who uses our pybis; not just posy. And apparently pypy has experience with this that we might be able to steal? Matti, maybe you can explain more about how pypy does it?The text was updated successfully, but these errors were encountered: