imathis/octopress — pull request #733 by dhedlund (2012-08-29 12:14:23+00:00)
Title: Force python 2.*, needed for rubypython gem via pygments.rb gem (#704)

INTERIM BUGFIX FOR: https://github.com/imathis/octopress/issues/704
an upstream solution is in the works but, as of 2012-08-29, the pygment.rb
gem has yet to incorporate necessary changes and release a new gem:
https://github.com/tmm1/pygments.rb/issues/10

Added code that tries to ensure that, when the 'python' command
is executed, it always returns an interpreter for version 2.* of python,
regardless of what the system-wide default version of python is. When the
system-wide version of python is not 2.* and a compatible version is found,
a .pygments-cache/python-bin/python symlink is created which points to the
compatible version. The python-bin directory is then added to the PATH
which gives priority to locally identified version.

Tried to make cross-platform but have limited systems to test with, can be
disabled by setting environment variable FORCE_PYTHON2=0