<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Install twisted package for http server when necessary."
   href="https://bugs.webkit.org/show_bug.cgi?id=147082#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Install twisted package for http server when necessary."
   href="https://bugs.webkit.org/show_bug.cgi?id=147082">bug 147082</a>
              from <span class="vcard"><a class="email" href="mailto:rniwa&#64;webkit.org" title="Ryosuke Niwa &lt;rniwa&#64;webkit.org&gt;"> <span class="fn">Ryosuke Niwa</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=257054&amp;action=diff" name="attach_257054" title="Patch">attachment 257054</a> <a href="attachment.cgi?id=257054&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=257054&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=257054&amp;action=review</a>

<span class="quote">&gt;&gt;&gt; Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:12
&gt;&gt;&gt; +    from webkitpy.common.system.autoinstall import AutoInstaller
&gt;&gt; 
&gt;&gt; Why don't we modify __init__.py in autoinstalled instead?
&gt;&gt; What happens if we've already installed twisted in that directory by using buildbot?
&gt; 
&gt; If we've installed twisted, we'll not catch ImportError.
&gt; If we modify __init__.py, how do we invoke the installation process? 
&gt; Do you mean we import autoinstall module in benchmark runner and it will check the installation of twisted and install it if necessary?</span >

But that's what we tried other day (importing autoinstall.buildbot) on my machine and we saw import didn't work.

<span class="quote">&gt; Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:16
&gt; +    installer = AutoInstaller(prepend_to_search_path=True, target_dir=install_path)
&gt; +    installer.install(url=&quot;<a href="https://pypi.python.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2#md5=f396f1d6f5321e869c2f89b2196a9eb5">https://pypi.python.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2#md5=f396f1d6f5321e869c2f89b2196a9eb5</a>&quot;, url_subpath=&quot;Twisted-12.1.0/twisted&quot;)</span >

There is already code that does this in __init__.py in webkitpy/thirdparty for when we import thirdparty.autoinstall.twisted.
Why don't we make that code more generic to do this instead?

It appears to me that having to download &amp; install twisted every time you run benchmark is somewhat inefficient/redundant.
I already hate the fact some of the benchmark plans require downloading the benchmark and we should add some code to cache the downloaded content.</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>