agg-kicad
agg-kicad copied to clipboard
Python failover
Ideally use python3 if present. If it isn't, use python2. If neither are present, print an error explaining the situation.
It is an improbable, but permissible, situation for a system to have python3 but not python2. The python alias is currently defined to point to python2 by PEP 394.
Downside to this is it gets confusing with virtualenvs. If you run make inside a python2 virtualenv, it will attempt to use python3 from outside the virtualenv in preference to running the venv's python2/python
I like this in principle, but as stands this doesn't work - you need to work out $PYTHON outside of a target, especially since you haven't modified all the other targets to depend on the python target.
Another consideration is that Python 2 might have pyyaml installed and Python 3 not, which would also need sorting out. Ideally have Travis build using Python 3 too, which will probably need python3 pyyaml installing.