Bug 32635

Summary: bugzilla-tool should not require users to install mechanize
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, levin, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 32728    
Attachments:
Description Flags
Step one
none
work in progress patch
none
Patch
none
Patch abarth: review+

Description Eric Seidel (no email) 2009-12-16 15:09:08 PST
bugzilla-tool should not require users to install mechanize

First step is to centralize our handling of mechanize imports.
Second step is to make a magical way to have it auto-downloaded.

(Another alternative would be to check in a copy of mechanize, but it's *huge* and we don't have a ThirdParty directory to check it in to.)  This lazy-download approach is slightly more error-prone than checking in a copy, but should still work.
Comment 1 Eric Seidel (no email) 2009-12-16 15:10:19 PST
Created attachment 45020 [details]
Step one
Comment 2 WebKit Review Bot 2009-12-16 15:13:07 PST
style-queue ran check-webkit-style on attachment 45020 [details] without any errors.
Comment 3 Eric Seidel (no email) 2009-12-16 16:28:21 PST
Comment on attachment 45020 [details]
Step one

I'll re-open the bug after the cq closes it. :)
Comment 4 WebKit Commit Bot 2009-12-16 16:40:17 PST
Comment on attachment 45020 [details]
Step one

Clearing flags on attachment: 45020

Committed r52228: <http://trac.webkit.org/changeset/52228>
Comment 5 WebKit Commit Bot 2009-12-16 16:40:21 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Eric Seidel (no email) 2009-12-16 16:41:44 PST
I'm going to be a hypocrite and re-use this bug for the second step if I can ever get it working...
Comment 7 Eric Seidel (no email) 2009-12-18 13:03:38 PST
So looks like step two could be done via easy_install with a --prefix directory.

Something like this:

PYTHONPATH=./webkit_module_cache/lib/python2.5/site-packages easy_install --prefix ./webkit_module_cache mechanize

and then we would edit sys.path to include ./webkit_module_cache
Comment 8 Eric Seidel (no email) 2009-12-18 13:57:50 PST
I think we can use http://pypi.python.org/pypi/autoinstall/0.1a2 to solve this problem.  I've emailed the author about licensing.
Comment 9 Eric Seidel (no email) 2009-12-18 17:50:05 PST
Created attachment 45215 [details]
work in progress patch
Comment 10 Eric Seidel (no email) 2009-12-18 17:50:56 PST
Comment on attachment 45215 [details]
work in progress patch

Sorry, forgot --no-review
Comment 11 Eric Seidel (no email) 2009-12-18 17:52:05 PST
I've spoken with the autoinstall.py author.  His intent was to make it clear that it is available under a BSD license, however he's agreed to release a new version which makes that explicit.  I also have a local patch to send him as well.
Comment 12 Eric Seidel (no email) 2009-12-29 14:30:50 PST
A new autoinstall module has been released:
 http://pypi.python.org/pypi/autoinstall/0.2
which clarifies that it's BSD licensed code.  This should be easy to finish, I just need to take a few moments and do it.
Comment 13 Eric Seidel (no email) 2010-01-04 01:14:13 PST
Created attachment 45777 [details]
Patch
Comment 14 Eric Seidel (no email) 2010-01-04 01:17:42 PST
Created attachment 45779 [details]
Patch
Comment 15 Adam Barth 2010-01-04 01:25:23 PST
Comment on attachment 45779 [details]
Patch

This sauce is awesome
Comment 16 Eric Seidel (no email) 2010-01-04 01:42:21 PST
Committed r52718: <http://trac.webkit.org/changeset/52718>
Comment 17 Eric Seidel (no email) 2010-01-04 02:24:47 PST
Committed r52723: <http://trac.webkit.org/changeset/52723>