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

early-needle-54791

07/11/2022, 7:56 PM
Hey @enough-analyst-54434 following the Exec format error fixes for pex in 2.1.95 (thanks again), I’m seeing similar ENOEXEC errors in our build sandbox because the Pip instance called by the resolver invokes the pex venv main script directly. Would you be open to a change to the pip.tool.spawn_download_distributions call to invoke pip.pex via the
<venv_dir>/bin/python
?
happy to contribute if that wasn’t implied
e

enough-analyst-54434

07/11/2022, 7:58 PM
I'm not following, can you explain what you're doing a bit more in detail?
e

early-needle-54791

07/11/2022, 7:59 PM
building a pex under some long sandbox path: Calling resolver.resolve leads to exec format errors from pip.pex venv
PEX_ROOT is also under this long sandbox path due to multitenancy concerns
e

enough-analyst-54434

07/11/2022, 8:00 PM
Ah, gotcha. SGTM!
e

early-needle-54791

07/11/2022, 8:00 PM
cool! I’ll put up a patch
e

enough-analyst-54434

07/11/2022, 8:01 PM
If you get it up quick I can get it out in 2.1.96: https://github.com/pantsbuild/pex/pull/1838 If not I'll fork off another tiny release just after.
e

early-needle-54791

07/11/2022, 8:01 PM
🕔
I’ll try
e

enough-analyst-54434

07/12/2022, 2:48 PM
@early-needle-54791 unless you've made progress, I'd like to bang this out. I'll be going offline for ~10 days starting tomorrow and I'd like to ensure this case is sorted: https://github.com/pantsbuild/pex/issues/1842
There was a bit of work here to cover all the bases; so I went ahead and posted: https://github.com/pantsbuild/pex/pull/1843
e

early-needle-54791

07/12/2022, 5:26 PM
Oh alright.
I”ve got a change working but just getting the testing set up
Let me test what you have up
🚢
maybe one day I’ll beat you to it and get a pantsbuild/pex contribution 😄
e

enough-analyst-54434

07/12/2022, 5:52 PM
Sorry about that @early-needle-54791, I'd certainly welcome any contribution you have. I'm part-time and ~the only active Pex maintainer currently so things were cramped this time around. I'm also guessing you weren't aware of the PEP 517 / 518 case and the
str
type for venv pexes would not have helped you find that case 😕 Pex 2.1.97 release prep: https://github.com/pantsbuild/pex/pull/1844
e

early-needle-54791

07/12/2022, 5:53 PM
Yeah exactly I didn’t know about the edge cases anyway so we would have had to have some back and forth.
Just teasing, I really appreciate your promptness and effort maintaining pex
e

enough-analyst-54434

07/12/2022, 8:53 PM
You're welcome. Pex 2.1.97 is now released with this fix.
e

early-needle-54791

07/12/2022, 10:22 PM
🎉
2 Views