[Webkit-unassigned] [Bug 184986] Make all python scripts compatible with both python2 and python3

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 3 09:56:30 PST 2018


--- Comment #9 from Michael Catanzaro <mcatanzaro at igalia.com> ---
(In reply to Michael Catanzaro from comment #8)
> So for any scripts used by the CMake build that are also used by Apple, we
> need to either (a) *generate* the script using a CMake-time configure
> replacement, e.g. from a .py.cmake file, or (b) just remove the shebang and
> explicitly invoke the python3 interpreter when executing it from CMake. (We
> can add CMake code to detect whether to use python3 or python2.) Unless
> Apple magically gains python3 support and it happens to be installed as
> /usr/bin/python3, I believe those are the only two possible solution.

Of course that only applies to scripts executed by the CMake build. That obviously won't work for the developer scripts to be modified in (2-5). For those scripts, the best approach is still to use #!/usr/bin/env python like we do now, and just ensure the scripts work with both versions of python, until such time that python3 is available for Apple.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181203/9dcf96bc/attachment.html>

More information about the webkit-unassigned mailing list