manodeep / Corrfunc

⚡️⚡️⚡️Blazing fast correlation functions on the CPU.
https://corrfunc.readthedocs.io
MIT License
164 stars 50 forks source link

Python set via an alias #52

Closed manodeep closed 8 years ago

manodeep commented 8 years ago

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).

PYTHON_VERSION_FULL := $(wordlist 2,4,$(subst ., ,$(shell python --version 2>&1)))

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.