[Webkit-unassigned] [Bug 128971] [GTK] webkit 2.3.5 build failure with python 3.3.4

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 15 05:44:33 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=128971

Michael Catanzaro <mcatanzaro at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcatanzaro at igalia.com

--- Comment #13 from Michael Catanzaro <mcatanzaro at igalia.com> ---
CC Darin: question for you at the bottom of this comment.

It's because cssmin.py uses the following shebang:

#!/usr/bin/python

For about four years now, this has declared that the script will run correctly under both python2 and python3 [1], but our script is only compatible with python2. (Yes, this was a compatibility break requiring changing all the shebangs of all python files everywhere. Note that /usr/bin/python is a symlink to /usr/bin/python3 on Arch, but to /usr/bin/python2 on other distros, so the bug presumably only occurs for Arch users. I have no comment on whether any of this was a good idea. ;)

The script must be modified to work with python3 in addition to python2 (the worst way to do this would be to ensure that no files it process include Unicode characters; the best way would be for someone who groks python to just fix the broken input stream), or the shebang must be changed to use /usr/bin/python2 instead of /usr/bin/python.

I'm quite impressed that this is apparently the only such compatibility issue in our build.

Warning: OS X used to not provide /usr/bin/python2. Presumably they do nowadays, since otherwise it will be a pain to fix the shebang, but maybe they don't. (I've CCed Darin to find out if we still need to support this case.) Without a /usr/bin/python2, you'd have to find the right python2 binary at the CMake step, then generate the python script using a CMake template file to substitute the right python binary into the shebang. In Autotools land you would do that using AM_PATH_PYTHON. Probably easier just to fix the script to work with python3.

[1] https://www.python.org/dev/peps/pep-0394/

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150915/64e52253/attachment.html>


More information about the webkit-unassigned mailing list