hundreds-father-404
10/08/2020, 6:34 PMbut the execution context for setuptools.pex is the source_rootWhat do you mean by this part? Normally, you’ll set
PEX_EXTRA_SYS_PATH
to handle source roots, which ends up appending to PYTHONPATH
.
https://github.com/pantsbuild/pants/blob/ea542ac164fb73459f7a7a90aff9c6646d2213e6/src/python/pants/backend/python/goals/pytest_runner.py#L227-L230
You can then run ./setuptools.pex ... src/python/path/to/f.py
, and it will appropriately handle the src/python
source root.