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

Make shebang line more portable (don't invoke wrong python version by mistake) #1

Closed
0ion9 opened this issue May 18, 2013 · 3 comments
Labels

Comments

@0ion9
Copy link

0ion9 commented May 18, 2013

On systems, such as Arch Linux, where Python 2 and 3 can coexist, it's a mistake to refer directly to the 'python' binary in a shebang: this will not always point at Python 2. On Arch for example, it points at Python 3, which 'rip' is not compatible with.

However, 'python2' can be relied on to always point at Python 2.x :) See http://www.python.org/dev/peps/pep-0394/

With that change to the shebang line, I was able to successfully install 'rip' on (Lighttpd + mod_cgi / Arch Linux x86_64)

@4pr0n
Copy link
Owner

4pr0n commented Jun 4, 2013

I just tried "python2" on my server and got

zsh: command not found: python2

$ ls /usr/bin/python*
/usr/bin/python /usr/bin/python2.5 /usr/bin/python2.5-config /usr/bin/python2.6 /usr/bin/python2.6-config /usr/bin/python-config

I could manually setup a symlink for 'python2' on my box, but then others with my same setup would too.

I have updated the installation wiki with solutions for this case.

Marking WontFix 'cause I'm lazy. Sorry!

@4pr0n 4pr0n closed this as completed Jun 4, 2013
@tyilo
Copy link

tyilo commented Jul 7, 2013

What about python2.7 ?

@4pr0n
Copy link
Owner

4pr0n commented Jul 8, 2013

As shown above, python2.7 is not on my box. I'm not going to make changes that will break my own copy.

I may look into supporting 3.0 (Shouldn't be too hard, not many print statements).

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

No branches or pull requests

3 participants