<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - generate-inspector-gresource-manifest.py uses the wrong python interpreter"
href="https://bugs.webkit.org/show_bug.cgi?id=153712">153712</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>generate-inspector-gresource-manifest.py uses the wrong python interpreter
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>WebKit Gtk
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jeremyhu@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>bugs-noreply@webkitgtk.org
</td>
</tr></table>
<p>
<div>
<pre>Originally reported at <a href="https://trac.macports.org/ticket/50472">https://trac.macports.org/ticket/50472</a>
configure finds an appropriate version of python:
:info:configure -- Found PythonInterp: /opt/local/bin/python2.7 (found suitable version "2.7.11", minimum required is "2.7.0")
but the build still fails when executing the generate-inspector-gresource-manifest.py script when the first python executable in $PATH is version 2.6:
:info:build [ 86%] Generating ../../DerivedSources/webkit2gtk/InspectorGResourceBundle.xml
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/Source/WebKit2 && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Tools/gtk/generate-inspector-gresource-manifest.py --output=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/DerivedSources/webkit2gtk/InspectorGResourceBundle.xml
...
:info:build Traceback (most recent call last):
:info:build File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Tools/gtk/generate-inspector-gresource-manifest.py", line 18, in <module>
:info:build import argparse
:info:build ImportError: No module named argparse
:info:build make[2]: *** [DerivedSources/webkit2gtk/InspectorGResourceBundle.xml] Error 1
The issue is that the script is executed directly with a hash-bang of "#!/usr/bin/env python" whereas other python scripts are executed using the configured interpreter, eg:
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/WebKit2 && /opt/local/bin/python2.7 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/WebKit2/Scripts/generate-messages-header.py WebProcess/WebPage/WebPage.messages.in > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/DerivedSources/WebKit2/WebPageMessages.h</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>