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

build.py has "/usr/bin/python2" hard-coded #88

Closed
r1chardj0n3s opened this issue Jan 17, 2013 · 7 comments · Fixed by #89
Closed

build.py has "/usr/bin/python2" hard-coded #88

r1chardj0n3s opened this issue Jan 17, 2013 · 7 comments · Fixed by #89

Comments

@r1chardj0n3s
Copy link
Contributor

There's no such interpreter on my system. There's not even a "python2" anywhere. I believe it's safe to assume "python" is Python 2.x and "python3" is not.

@r1chardj0n3s
Copy link
Contributor Author

(also, '/usr/bin/env python' will play more nicely with virtualenvs)

@brousch
Copy link
Contributor

brousch commented Jan 18, 2013

It looks like this was changed recently in response to another bug report: #60

What are you running that doesn't have python2?

@brousch
Copy link
Contributor

brousch commented Jan 18, 2013

Since Kivy only supports Python2.7 I think the best solution would be to change that line to:
#!/usr/bin/env python2.7

@r1chardj0n3s
Copy link
Contributor Author

I'm on OS X and it's quite rare (as I understand it) to use a "python2" name for Python 2.*

Your suggested solution would work.

@brousch
Copy link
Contributor

brousch commented Jan 19, 2013

Hm, it looks like '/usr/bin/env python2' is correct.
http://www.python.org/dev/peps/pep-0394/
"In order to tolerate differences across platforms, all new code that needs to invoke the Python interpreter should not specify python, but rather should specify either python2 or python3 (or the more specific python2.x and python3.x versions; see the Migration Notes). This distinction should be made in shebangs, when invoking from a shell script, when invoking via the system() call, or when invoking in any other context."

@tshirtman
Copy link
Member

Yeah, i was sure there was a pep about this, just wasn't able to find it again yesterday.

@r1chardj0n3s
Copy link
Contributor Author

I understand about there being a PEP, but that doesn't change there being no "python2" on OS X by default. As I mentioned though, there is a "python2.7" that could be used.

@tito tito closed this as completed Jan 28, 2013
kivatu pushed a commit to kivatu/python-for-android that referenced this issue Feb 26, 2014
This is to fix kivy/python-for-android#88
The ideal solution, according to Python PEP 0394, would seem to be 
'#!/usr/bin/env python2', however that PEP is unfortunately not 
well-followed by OSX and even Linux distros like Arch and Debian 
Squeeze. Because of this, and because Kivy currently only supports 
Python2.7, the more practical solution is '#!/usr/bin/env python2.7'.
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 a pull request may close this issue.

4 participants