[21:56:42] <simon_weber> I have a package that uses preloading to mock time calls (https://github.com/wolfcw/libfaketime). It works fine in python when I manually set LD_PRELOAD; is there any way I can package this so that a user needn't manually set their LD_PRELOAD?
[21:58:33] <simon_weber> ie, ideally the user would just import my python package during their tests as an alternative to eg https://github.com/spulec/freezegun, and never have to futz with their environment variables
[22:12:02] <dstufft> simon_weber: you can modify os.environ
[22:16:17] <simon_weber> dstufft: I think that happens to late. for the preload to take effect, it needs to be set when libraries are being linked
[22:17:10] <simon_weber> I was hoping for some kind of equivalent to lib/pythonx.x/site-packages, but things would be automatically preloaded. Doesn't look like that's the case, though.
[22:19:24] <simon_weber> hm, I thought that was just for sys.path modification?
[22:21:08] <dstufft> theortically, but you can execute arbitrary python in it
[22:22:40] <simon_weber> I'll give it a shot, but I have a feeling anything I can do at runtime is already too late, because preloading need to happen, well, before loading my code
[22:36:09] <simon_weber> dstufft: yeah, doesn't look like setting it at that point has any effect, unfortunately
[22:36:24] <simon_weber> I may just have to tell folks to use autoenv/similar