Closed jsirois closed 4 weeks ago
This was a good idea from @bkad and it completes the work started by @BrandonTheBuilder in #1746 at PyCon US 2022. I think Pex now supports all Python interpreter args that make sense in all modes of operation.
The tests make sense to me and capture the original request of passing -u
to the interpreter.
Support preserving and injecting Python args.
Pex now supports
--inject-python-args
similar to--inject-args
but for specifying arguments to pass to the Python interpreter as opposed to arguments to pass to the application code. This is supported for both zipapp and venv execution modes as well as standard shebang launching, launching via a Python explicitly or via the--sh-boot
mechanism.In addition, PEX files now support detecting and passing through Python args embedded in shebangs or passed explicitly on the command line for all Pythons Pex supports save for
PyPy<3.10
where there appears to be no facility to retrieve the original argv PyPy was executed with.Closes #2422