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

witty-crayon-22786

04/12/2019, 4:35 PM
you'd have to pass
--inherit-sitepackages
?
e

enough-analyst-54434

04/13/2019, 12:37 AM
That's correct. You'd have to pass
--inherit-path=(fallback|prefer)
when building the pex to get it to not scrub sys.path. You can observe scrubbing (or lack thereof) by running the pex with
PEX_VERBOSE=9
. You can also sanity check the pex with
unzip -qc <pex file> PEX-INFO | jq .inherit_path
. At runtime there is the
PEX_INHERIT_PATH
env var / slurping that from .pexrc. Perhaps you are being bit by the last.
w

witty-crayon-22786

04/13/2019, 12:41 AM
Ok, thanks! Will look into that Monday.
@enough-analyst-54434: mmm:
Copy code
pex: Not a tainted path element: /Users/example/.venvburrito/lib/python2.7/site-packages
pex: Not a tainted path element: /Users/example/.venvburrito/lib/python2.7/site-packages/setuptools-28.8.0-py2.7.egg
pex: Not a tainted path element: /Users/example/.venvburrito/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg
the
venvburrito
entry caused a few users some issues
e

enough-analyst-54434

04/15/2019, 10:20 PM
pex: Not a tainted path element: .../site-packages
implies PEX_INHERIT_PATH. That is the crucial investigatory bit to suss. If set in PEX-INFO, env or via .pexrc that is the issue and it's of the foisted on petard variety. If not, it's a pex
sys.path
scrubbing bug.
w

witty-crayon-22786

04/15/2019, 10:25 PM
Copy code
$ unzip -qc  ~/.cache/pants/pex/bin/pants.pex/1.15.0rc0-git5c01b701/pants.pex PEX-INFO | jq .inherit_path
"false"
e

enough-analyst-54434

04/15/2019, 10:25 PM
Ok, not surprising. .pexrc though is the Twitter issue generally. Conclusions on that?
w

witty-crayon-22786

04/15/2019, 10:25 PM
these users have no
PEX
-related env... i'll double check that we're not setting it anywhere
~/.pexrc
sets
PEX_PYTHON_PATH
and
PEX_PYTHON
, but not inherit
...nothing setting
PEX_INHERIT_PATH
...would more of the PEX_VERBOSE output help?
e

enough-analyst-54434

04/15/2019, 10:27 PM
A straight up issue would be amazing.
w

witty-crayon-22786

04/15/2019, 10:28 PM
yea. alrighty.
e

enough-analyst-54434

04/15/2019, 10:28 PM
I can give you debug steps there that will involve unzipping, editing a file, etc.
w

witty-crayon-22786

04/15/2019, 10:48 PM
e

enough-analyst-54434

04/15/2019, 10:51 PM
Excellent - thank you.