pygments / pygments.rb

💎 Ruby wrapper for Pygments syntax highlighter
MIT License
572 stars 141 forks source link

mentos.py uses /usr/bin/python, desires python2. #49

Closed katanacrimson closed 11 years ago

katanacrimson commented 11 years ago

Not sure how many distros are doing this now, but I know a few are using "python2" to indicate python 2.x nowadays - and some have set /usr/bin/python to mean python 3.x.

muoji commented 11 years ago

Archlinux is doing this, and it's causing me problems.

I saw that the call to mentos.py is only done with the path to the file and relying on its shebang to call python. I think it could be not too hard to implement a way to configure pygments to specify a path to python and then using it to call mentos.py. It would solve the problem for distros that now use /usr/bin/python for python3, without breaking backward compatibility.

katanacrimson commented 11 years ago

PING. Come on, seriously. This is one hell of an annoying problem to leave for months on end. Can't you check to see if the /usr/bin/python2 executable exists in the filesystem and use that over /usr/bin/python?

pidpawel commented 11 years ago

Problem exists on Gentoo too.

madhatter commented 11 years ago

Another ping. I really would like to have this fixed.

seven1m commented 11 years ago

+1

mindfulmonk commented 11 years ago

For those using rbenv and Arch Linux: vim .rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/pygments.rb-0.4.2/lib/pygments/mentos.py and change it to look like this

!/usr/bin/env python2

tnm commented 11 years ago

Should be resolved in latest release.