WebCore/inspector/Scripts/jsmin.py uses the shebang #!/usr/bin/python; the correct shebang is #!/usr/bin/python2. See http://www.python.org/dev/peps/pep-0394/.
<rdar://problem/15751675>
What platforms does this affect?
It affects Arch Linux and derived distros (e.g. Parabola). All major Linux distros include the /usr/bin/python2 symlink, but OS X doesn't include it out-of-the-box. If you're concerned about out-of-the-box operation on OS X, you could make the shebang configurable using e.g. automake. AFAIK the official Python installer for OS X *does* install /usr/bin/python2 by default and has done so for several years; not sure why it's not present on OS X.
Yes, out of the box on OS X is critical to keep working. Would "#!/usr/bin/env python" be the right thing to do? That is what our other scripts in Tools/Scripts do.
No, that won't work :( The usual solution is that Arch Linux patches the upstream when creating packages, but I'm using a less sophisticated build system that doesn't allow automatic patching, and so manual action is needed before every build. It'd be nice if this weren't necessary. Could you possibly look into why OS X doesn't provide /usr/bin/python2 ? It'd be nice if /usr/bin/python2 could work everywhere. Arch Linux changing /usr/bin/python was stupid IMHO, but upstream agrees with the eventual goal of making this change, and has recommended that scripts switch to /usr/bin/python2 now.
OS X switching to /usr/bin/python2 is out of our control and would be 1-2 years in the future if it happened. Plus WebKit supports building on OS X versions that will always only have /usr/bin/python. This is a problem that needs solved on/by the affected platforms, not WebKit. As I mentioned all other scripts in WebKit use /usr/bin/python or /usr/bin/env python not just jsmin.py.