adamant-magazine-16751
04/06/2023, 3:16 PMuvicorn
when using ./pants export
I'd like to be able to sometimes run them without actually invoking pants. The reason is we've got some code in the repo that we do not package and only run during development or as pocs, and it is often easier and faster to just run it this way.
The problem I'm facing is that the scripts ignore PYTHONPATH
variable so I'm unable to import my first-party code.
I compared the scripts exported using pants and the ones created with pip install
and the only difference is in the shebang - the pants ones include -sE
flags. This explains why they ignore PYTHONPATH
. I assume this is by design. What's the rationale behind it? Is there a way to get rid of the -E
flag?sparse-lifeguard-95737
04/06/2023, 3:22 PMadamant-magazine-16751
04/06/2023, 3:37 PM