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

Check for correct python2 binary in Makefile #14

Merged
merged 3 commits into from
Apr 17, 2018
Merged

Conversation

roflcopter4
Copy link
Contributor

@roflcopter4 roflcopter4 commented Apr 16, 2018

Re: issue #13

I decided to go ahead and make that little change, and do it just a wee bit smarter than blindly replacing all instances of python with python2, which can't be considered portable. This little shell function should detect which name python2 goes by on a system, and fails if it isn't found. It is notable that this means the whole compilation will fail if python2 isn't found. I doubt this would be a big issue since the build only exists in the first place to run the tests, which require python2. And really, if your version of python is broken you have far more serious concerns for your system than messing around with regular expression libraries!

Anyway, maybe also worth noting that truly ancient (read: pre 1990) shells do not understand the "command -v" command. If anyone is using such a shell then this will fail. I recommend that any such person report to the nearest museum for permanent display.

Jokes aside, this tiny little fix should work with any sensible version of make and any halfway sensible shell, and mostly resolves the issue of finding the right python.

EDIT: Eugh. I should really learn to double check things before I make pull requests. I changed a few values to test the changes and forgot to change them back. Everything is ok now. Sorry about that.

@kokke kokke merged commit bf9b2f0 into kokke:master Apr 17, 2018
@kokke
Copy link
Owner

kokke commented Apr 17, 2018

This is awesome :) Thanks for the PR @roflcopter4

@kokke kokke mentioned this pull request May 22, 2018
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