I have encountered two cases where python is set via an alias. There is essentially no foolproof way of solving this alias issue -- since aliases are not available in non-interactive shells (as are the ones run by make with $(shell).
However, the user needs to be at least warned about this scenario, and a potential fix suggested. One way to solve it is to alias | grep python, and then checking if the RHS contains python as the last word. In that case, the user has to replace all instances of python with this RHS.
Or, I could just see if there is an alias and define a variable PYTHONCOMMAND appropriately and then use PYTHONCOMMAND exclusively in place of python.
I have encountered two cases where python is set via an alias. There is essentially no foolproof way of solving this alias issue -- since aliases are not available in non-interactive shells (as are the ones run by
make
with$(shell)
.However, the user needs to be at least warned about this scenario, and a potential fix suggested. One way to solve it is to
alias | grep python
, and then checking if the RHS containspython
as the last word. In that case, the user has to replace all instances of python with this RHS.Or, I could just see if there is an alias and define a variable PYTHONCOMMAND appropriately and then use PYTHONCOMMAND exclusively in place of
python
.