A couple of my coworkers have been bitten by the s...
# general
s
A couple of my coworkers have been bitten by the shebangs in PEX being longer than 127 character issue (See linked messages for more info). It looks like a fix was merged into Pex https://github.com/pantsbuild/pex/pull/2295/files#diff-b1297a55702e854b6233796710a712f1f3fd47905ecc1fabd9f03c63ac980b43R1473-R1487 but I'm not sure how that relates to a fix being included in Pants. If someone could help clarify that would be greatly appreciated! https://pantsbuild.slack.com/archives/C046T6T9U/p1700074427567259 https://pantsbuild.slack.com/archives/C046T6T9U/p1704996581514559
h
You upgrade pex by setting
version
and
known_versions
under
[pex-cli]
in your
pants.toml
, as described here.
🙏 1
s
Thanks
c
... and eventually newer versions of pants will use a version of pex with the fix in it by default.
s
I tried setting
version = "v2.1.159"
but I get
Copy code
UnknownVersion: No known version of pex v2.1.159 for linux_x86_64 found in ('v2.1.108|macos_arm64|21d7803ef39203a6b2ae9f9e2678636e3c38ba17226ea33d6305f0683ab72e84|3848678', 'v2.1.108|macos_x86_64|21d7803ef39203a6b2ae9f9e2678636e3c38ba17226ea33d6305f0683ab72e84|3848678', 'v2.1.108|linux_x86_64|21d7803ef39203a6b2ae9f9e2678636e3c38ba17226ea33d6305f0683ab72e84|3848678', 'v2.1.108|linux_arm64|21d7803ef39203a6b2ae9f9e2678636e3c38ba17226ea33d6305f0683ab72e84|3848678')
Is this intentional?
When I was looking at PEX releases I didn't see anything like download by platform. I didn't realize the sha256 are all the same. Got it working! Thanks again
Sorry to revive an old thread, but should I expect to see something like
Copy code
#!/bin/sh
# N.B.: This python script executes via a /bin/sh re-exec as a hack to work around a
# potential maximum shebang length of {max_shebang_length} bytes on this system which
# the python interpreter `exec`ed below would violate.
''''exec {python} "$0" "$@"
'''
after updating PEX? Unfortunately I don't, and more coworkers have complained to me about Pants giving them an Exec Format Error*