More disambiguation of Python in makefiles (#18284)