pex
pex copied to clipboard
Make whether to take min or max version interpreter configurable in pex CLI
During interpreter selection portions of the pex codebase (for building pexes and for running them), the logic is currently selecting the lowest-version interpreter when multiple compatible interpreters are present.
A useful feature would be to have a command line flag that allows the user to specify whether to take the min or max versioned interpreter amongst multiple compatible interpreters. This would allow greater flexibility in a given organization's interpreter management strategies.
A clear example of when this filtering occurs is in the interpreter selection logic of the build_pex function in bin/pex.py.