https://pantsbuild.org/ logo
#pex
Title
# pex
e

early-needle-54791

10/08/2020, 1:29 AM
Question regarding use of pex path. If a pex is linked to another pex via pex path, should the source files exposed in the pex dependency be accessible in the file tree of the dependee pex, even if the source files in the pex dependency aren’t part of a distribution?
e

enough-analyst-54434

10/08/2020, 3:14 AM
"In the file tree"?
I think no.
PEX_PATH
just adds to
sys.path
it does no moving of files.
e

early-needle-54791

10/08/2020, 5:12 PM
I think that answers my question. But to be clear source files of the dependency do not magically become source files of the dependee?
e

enough-analyst-54434

10/08/2020, 6:03 PM
Correct. They are only added to sys.path. So you can access those source files via import or pkg_resources.resource_(string|stream) but not via filesystem operations.
PEX files are immutable and probably always will be might be another more useful way to think about this.
👌🏻 1
e

early-needle-54791

10/08/2020, 6:10 PM
That is helpful. Thanks John