<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mcatanzaro&#64;igalia.com" title="Michael Catanzaro &lt;mcatanzaro&#64;igalia.com&gt;"> <span class="fn">Michael Catanzaro</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] webkit 2.3.5 build failure with python 3.3.4"
   href="https://bugs.webkit.org/show_bug.cgi?id=128971">bug 128971</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>mcatanzaro&#64;igalia.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] webkit 2.3.5 build failure with python 3.3.4"
   href="https://bugs.webkit.org/show_bug.cgi?id=128971#c13">Comment # 13</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] webkit 2.3.5 build failure with python 3.3.4"
   href="https://bugs.webkit.org/show_bug.cgi?id=128971">bug 128971</a>
              from <span class="vcard"><a class="email" href="mailto:mcatanzaro&#64;igalia.com" title="Michael Catanzaro &lt;mcatanzaro&#64;igalia.com&gt;"> <span class="fn">Michael Catanzaro</span></a>
</span></b>
        <pre>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] <a href="https://www.python.org/dev/peps/pep-0394/">https://www.python.org/dev/peps/pep-0394/</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>