flat-zoo-31952
11/16/2020, 11:00 PMsitecustomize
hooks with pex? Specifically my prod team wants to use datadog's ddtrace-run
hook, which seems to just inject their sitecustomize
hook at the front of PYTHONPATH
and then uses os.execl
to swap for the new python processenough-analyst-54434
11/17/2020, 12:08 AMenough-analyst-54434
11/17/2020, 12:13 AMenough-analyst-54434
11/17/2020, 12:13 AMflat-zoo-31952
11/17/2020, 12:21 AMflat-zoo-31952
11/17/2020, 12:22 AMenough-analyst-54434
11/17/2020, 1:18 AMflat-zoo-31952
11/17/2020, 4:45 PMsitecustomize
which is loaded by the site
module before the main.py shim. If there's a way i could inject a sitecustomize into the pex, and ensure it gets loaded before main, i think this could work without involving some kind of main-delegator