Ouch! Scons, imp issue.

11 views
Skip to first unread message

JimC

unread,
Oct 27, 2009, 11:37:25 AM10/27/09
to Movable Python
Took me a while to track this one down.

SCons 1.2.0 (current stable version) fails with Movable Python because
it expects imp.find_module to raise an exception with text "No module
named..." whereas the version of imp in Movable Python under exactly
the same circumstances actually raises one with the message "Failed to
find module...".

Leaving aside the SCons team's highly questionable decision to rely on
the specific exception text, I gather you've modified/extended the imp
module?

Oh, and I'm comparing Movable Python for Python 2.4.4 to the same
version of CPython.

-Jim C.

JimC

unread,
Oct 27, 2009, 11:52:54 AM10/27/09
to Movable Python
Forgot to mention: All SCons is doing is checking to see whether the
error message from find_module is of exactly the form mentioned above.
If it is, it continues happily on its way, eventually finding its own
copy of the relevant module (a build tool description); if not, it
raises an exception and aborts. Commenting out the two relevant lines
makes it work & hasn't bitten me yet...

JimC

unread,
Oct 27, 2009, 1:17:12 PM10/27/09
to Movable Python
Think I found it, _find_module() in zip_imp.py...

Michael Foord

unread,
Oct 27, 2009, 3:33:17 PM10/27/09
to mo...@googlegroups.com
JimC wrote:
> Think I found it, _find_module() in zip_imp.py...
>

That sounds like the right place. :-)

Michael

> >


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog


Reply all
Reply to author
Forward
0 new messages