Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python failover #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

cillian64
Copy link
Contributor

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

@adamgreig
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants