Closed zanieb closed 4 years ago
Thank you for this pull request.
I am a bit conflicted about your use case, though. Wouldn't it be easier to rename/delete Matlab's own libstdc++? That's what I typically do.
Apart from LD_PRELOAD
, is there another use case, where this would be useful?
I was also a bit conflicted about the use case, it seems like there would always be a way to fix the environment from Matlab's end. I'll do some research and see if people frequently change the environment for other purposes.
OK, you do that.
At any rate, it might be worth considering to simply pass all additional keyword arguments of Matlab
on to Popen
.
I clearly have not had time to look into this and will close this PR. Thanks for your time!
It's been a while! But no worries, we all do this for fun. Stay safe!
Matlab sometimes need to be run with a modified environment.
This PR adds support for modifying environment variables for the spawned matlab process.
e.g.
mat = transplant.Matlab(executable='/opt/matlab/R2017a/bin/matlab', env=dict(LD_PRELOAD='/usr/lib64/libstdc++.so.6'))