numerous-fall-96475
05/06/2020, 4:06 PMhundreds-father-404
05/06/2020, 4:09 PMhundreds-father-404
05/06/2020, 4:11 PMpython
aloof-angle-91616
05/06/2020, 4:11 PMaloof-angle-91616
05/06/2020, 4:11 PMhundreds-father-404
05/06/2020, 4:12 PMaloof-angle-91616
05/06/2020, 4:13 PMhundreds-father-404
05/06/2020, 4:14 PMdo we need to use the python exe in the command line here?Yes, I believe this is necessary. See a comment in
hermetic_pex.py
lines 43-37 for why we use the generic python
name rather than something more specific like python3.7
aloof-angle-91616
05/06/2020, 4:16 PMaloof-angle-91616
05/06/2020, 4:17 PMhundreds-father-404
05/06/2020, 4:24 PMpython
name because Pants does not know which single Python interpreter to use, nor does it know the absolute path to that interpreter. We leave it up to the OS + Pex to handle all binary selection.
We might be able to get away with /usr/bin/python
, but I think we had issues with each OS handling that differently. For example, macOS will in its next release not even ship with Python. We wonât know if users installed their python
bin in /usr/bin/python
or somewhere else.numerous-fall-96475
05/06/2020, 4:25 PMaloof-angle-91616
05/06/2020, 4:26 PMpython
prefix would select the correct interpreter automatically. i actually know thatâs not true, because i recently had to make the change to several ci jobs to add it. but i donât know why thereâs a difference in behaviornumerous-fall-96475
05/06/2020, 4:26 PMaloof-angle-91616
05/06/2020, 4:26 PMaloof-angle-91616
05/06/2020, 4:27 PMaloof-angle-91616
05/06/2020, 4:27 PMaloof-angle-91616
05/06/2020, 4:27 PMaloof-angle-91616
05/06/2020, 4:28 PMaloof-angle-91616
05/06/2020, 4:28 PMnumerous-fall-96475
05/06/2020, 4:30 PMaloof-angle-91616
05/06/2020, 4:31 PMaloof-angle-91616
05/06/2020, 4:32 PM--no-process-execution-cleanup-local-dirs
, look at the output for a directory path âpreserved local process execution dir atâaloof-angle-91616
05/06/2020, 4:32 PMaloof-angle-91616
05/06/2020, 4:33 PMnumerous-fall-96475
05/06/2020, 4:34 PMaloof-angle-91616
05/06/2020, 4:35 PMwitty-crayon-22786
05/06/2020, 4:37 PMwitty-crayon-22786
05/06/2020, 4:37 PMpython
in that PATH, afaict.hundreds-father-404
05/06/2020, 4:38 PMwhich -a python
in the CI job would helpwitty-crayon-22786
05/06/2020, 4:39 PMpex
has started, it will locate an appropriate one in the PATH to match the constraint.numerous-fall-96475
05/06/2020, 10:41 PMnumerous-fall-96475
05/06/2020, 11:02 PMwitty-crayon-22786
05/06/2020, 11:03 PMpython
witty-crayon-22786
05/06/2020, 11:03 PMpython
?numerous-fall-96475
05/06/2020, 11:03 PMwitty-crayon-22786
05/06/2020, 11:04 PMhundreds-father-404
05/06/2020, 11:04 PMnumerous-fall-96475
05/06/2020, 11:04 PMwitty-crayon-22786
05/06/2020, 11:04 PMnumerous-fall-96475
05/06/2020, 11:04 PMnumerous-fall-96475
05/06/2020, 11:04 PMaloof-angle-91616
05/06/2020, 11:05 PMhundreds-father-404
05/06/2020, 11:05 PMpython
shows up on your PATH
2) Modify the interpreter_search_paths
option to point to a binary named python
, if you have one. See https://pants.readme.io/v1.27/docs/python-interpreter-compatibility#changing-the-interpreter-search-path.aloof-angle-91616
05/06/2020, 11:06 PMwitty-crayon-22786
05/06/2020, 11:07 PMwitty-crayon-22786
05/06/2020, 11:07 PMpython ./pex
in favor of #!/env/please/just/any python*
witty-crayon-22786
05/06/2020, 11:08 PMaloof-angle-91616
05/06/2020, 11:08 PMwitty-crayon-22786
05/06/2020, 11:09 PMpython3
, which was the bug here.