happy-kitchen-89482
07/13/2021, 1:16 AMpackage
goal running existing setup.py
files in the repo. But there is an issue with the cwd: VenvPexProcess
is currently set up to run with the cwd as the sandbox root. But handwritten setup.py
files are usually authored under the assumption that the cwd
is wherever the setup.py
is. This affects what relpaths in setup.py
are relative to, for example.
It seems like the right thing to do is to set working_directory
on the underlying Process
to wherever setup.py
is. I've tried this, but unfortunately the VenvPexProcess
shim script machinery doesn't like it.
We could strip the relevant prefix so that setup.py
ends up in the root, under the reasonable assumption that everything it references is under it in the repo. However this causes issues with capturing the output of running setup.py develop
which writes in unpredictable locations under the cwd. So we'd have to capture the entire sandbox as output (this currently fails, due to absolute symlinks in the pex cache dir, but we could fix that I imagine).
Any thoughts on which is the right way to go? Could the Pex/VenvPex machinery be easily made to support running from a cwd other than the root, or is that just asking for trouble?happy-kitchen-89482
07/13/2021, 1:16 AMenough-analyst-54434
07/13/2021, 2:05 AMenough-analyst-54434
07/13/2021, 2:05 AMenough-analyst-54434
07/13/2021, 2:05 AMenough-analyst-54434
07/13/2021, 2:09 AMhappy-kitchen-89482
07/13/2021, 3:57 AMhappy-kitchen-89482
07/13/2021, 3:58 AMenough-analyst-54434
07/13/2021, 4:38 AMhappy-kitchen-89482
07/14/2021, 1:57 PMhappy-kitchen-89482
07/14/2021, 1:58 PM