fresh-dentist-96982
09/30/2023, 3:58 PMpex.platform for your local machine?
Like some python code to output the platform string?enough-analyst-54434
09/30/2023, 4:04 PM--platform for your machine. The --platform is per interpreter per machine. So if you have more than one interpreter, you must have in mind which you care about.
If you read pex --help for --platform you'll find it details the platform for the interpreter that is running pex --help.
You absolutely positively never ever want to use --platform anyhow. Please read up on --complete-platform and use that instead: https://pex.readthedocs.io/en/v2.1.147/buildingpex.html#complete-platformfresh-dentist-96982
09/30/2023, 4:14 PMenough-analyst-54434
09/30/2023, 4:25 PM--complete-platform to target the "foreign" interpreter, yes. The --platform argument is much older. It originated at Twitter and is broken for most situations. It's only supported because Pex has a policy of not breaking backwards compatibility ever in the 2.x release series.enough-analyst-54434
09/30/2023, 4:27 PM--complete-platform / building a "multiplatform" PEX you probably want to control --python-shebang instead of accepting the default to ensure it is a shebang that will work to find all targeted interpreters on all target machines or else use --sh-boot.enough-analyst-54434
09/30/2023, 4:28 PMhead -1 my.pex to see what the default shebang is. That shebang needs to be valid on all targeted machines if you want to run the PEX directly, like so: ./my.pex. If you run the PEX using Python (/this/python my.pex), then, of course, the shebang doesn't matter / isn't used by the OS.fresh-dentist-96982
09/30/2023, 5:04 PMfresh-dentist-96982
09/30/2023, 5:04 PMenough-analyst-54434
09/30/2023, 5:11 PM!/usr/bin/env python3.10 you'll have a problem when the PEX lands on a either a Mac arm or Linux x86-64 machine with Python 3.11 but not 3.10.fresh-dentist-96982
09/30/2023, 5:12 PMfresh-dentist-96982
09/30/2023, 5:15 PMenough-analyst-54434
09/30/2023, 5:18 PMfresh-dentist-96982
09/30/2023, 5:19 PMThe third party dependencies have different packages for MacOS vs Linux
enough-analyst-54434
09/30/2023, 5:20 PM