Open vlaci opened 3 weeks ago
I was thinking, since this will probably be needed just for Linux, that it might be nice to eventually have an LD_PRELOAD that removed the path from LD_LIBRARY_PATH. That way this exact same trick can be applied to ruby, nodejs and more.
Still useful to have this pth to see how it fares in the python world.
Can we get some tests for this?
Injecting
LD_LIBRARY_PATH
to the Python runtime environment is great to bypass the need of having to patch non-nix binaries loaded into that environment, however it breaks down, when Python executes any other program not compiled for the given Nix system, e.g. a shell script viasubprocess
.To work this around,
devenv
will inject apth
^1 file to the virtual environment it creates, which mangles theLD_LIBRARY_PATH
variable, undoing any changes to it made bydevenv
but preserving changes from other sources.I am unsure what the best way would be to integrate this, bit I think the approach in general is sane. I am tested only the poetry case currently.
Fixes #1111