Please sign in to comment.
Fix ./pants2 overriding desired $PY interpreter (#7338)
### Problem Very similar to #7334 that `./pants2` was overriding interpreter constraints, it's become a problem that it also overrides `$PY`, which is to bootstrap Pants. This led to an issue where we meant to bootstrap Pants with Python 2.7.15 but instead bootstrapped with 2.7.13. Specifically, see https://travis-ci.com/Eric-Arellano/pants/jobs/183283217#L613, where we had set $PY to point to pyenv's `python2.7`, but it is using the system Python. ### Solution Allow the env var to be pre-set, else default to using `python2.7`. #### Also simplify `ci.sh` Because we override $PY and $PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS already, there is no advantage to using ./pants2 vs ./pants beyond additional complexity. So, we always use `./pants`. ### Result `./pants2` will default to using unconstrained Python 2.7. `PY=/usr/bin/python2.7` will run with Python 2 and that specific interpreter. Both commands will provide default interpreter constraints for spawned subprocesses.
- Loading branch information...