-
Notifications
You must be signed in to change notification settings - Fork 126
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
python2 isn't available on OS X #18
Comments
python2 is there because git-imerge requires Python version 2.x as opposed to Python 3.x (or, God forbid, Python 1.x). According to PEP 394, it is recommended that some Python 2.x interpreter be installed in PATH under the name "python2". I understand that this is not yet universal practice, but on the other hand there are already systems where "python" is a Python version 3.x interpreter, so that option is also not universally portable. By the way, I think that any Python interpreter version 2.5 <= version < 3.0 should be fine for git-imerge. |
I resolved this by supporting both Python 2 and 3. @mhagger, if you are interested, I can either send a pull requests or you can just merge my fork. The continuous integration server shows the test results. |
@myint, that's really cool! I hadn't yet had the energy to get any of my projects running under Python3. It's a lot less nasty than I would have feared. I just pushed some commits to master that incorporate some of the changes from your first commit. The remainder of your changes (i.e., after the already-merged changes have been removed) are in my repo under branch What is the situation on the Mac OSX? (Is that is what you are using?) Is Python 2.x unavailable, or is it available, but just not under the name (If the latter, then there are other ways to make sure that a Python 2.x interpreter is used to run the script. Either the script can be given a Shell preamble that chooses the correct Python interpreter, or we could add an install script that overwrites the shebang line with the one correct for the system that it is running on. Not that python3 compatibility is something bad, but reducing the python2 compatibility might still be inconvenient for some users.) Before these changes, I think that Thanks again for your contribution! |
Python 2.x comes installed on OS X, as |
Like @jdelStrother mentioned, I've enabled the Python 2.6 test on Travis CI (450e728). It works. See test results here. I could enable Python 2.5 support, but the code will get a bit uglier. (The |
@myint: Thanks for the additional info. I was confused; I thought that "except E as T" syntax wasn't added until Python 2.7. Now I see that it was backported to Python 2.6.1. So if we merge your changes, I think our Python version requirement would become
(that is, unless something else that you are using was introduced even later than 2.6.1). I think we can live with that. I just merged your change (though the commit identities have changed, so you might want to pull from me again). Thanks! |
Great! By the way, as far as I know the |
@myint: I was going by the language reference for 2.6 vs 2.6.1. The I'll fix the README. |
Don't know if you were aware of this, but python2 isn't available on OS X, so I had to create a symlink before I could run imerge. On 10.8, the
python
binary is 2.7.2.I've not got much experience with python... I assume python2 is there for a good reason?
The text was updated successfully, but these errors were encountered: