4pr0n / rip

album ripper
GNU General Public License v2.0
45 stars 18 forks source link

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

Closed 0ion9 closed 11 years ago

0ion9 commented 11 years ago

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 commented 11 years ago

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!

tyilo commented 11 years ago

What about python2.7 ?

4pr0n commented 11 years ago

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).