Bug 126512
Summary: | Web Inspector: jsmin.py uses shebang #!/usr/bin/python | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kerrick Staley <bugs> |
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | graouts, joepeck, timothy, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Kerrick Staley
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/15751675>
Timothy Hatcher
What platforms does this affect?
Kerrick Staley
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
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
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
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.