RESOLVED WONTFIX 126512
Web Inspector: jsmin.py uses shebang #!/usr/bin/python
https://bugs.webkit.org/show_bug.cgi?id=126512
Summary Web Inspector: jsmin.py uses shebang #!/usr/bin/python
Kerrick Staley
Reported 2014-01-06 00:29:38 PST
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/.
Attachments
Radar WebKit Bug Importer
Comment 1 2014-01-06 00:29:50 PST
Timothy Hatcher
Comment 2 2014-01-06 11:02:17 PST
What platforms does this affect?
Kerrick Staley
Comment 3 2014-01-06 11:17:04 PST
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.
Timothy Hatcher
Comment 4 2014-01-06 11:21:50 PST
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.
Kerrick Staley
Comment 5 2014-01-06 11:32:51 PST
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.
Timothy Hatcher
Comment 6 2014-01-06 11:45:01 PST
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.
Note You need to log in before you can comment on or make changes to this bug.