#77 mxTidy error when using --bundle

closed-fixed
nobody
None
5
2005-09-15
2005-09-12
No

I use py2exe 0.6.2 on a Python 2.4 program (running on
Windows XP Pro SP2 with the latest winall) that imports
(Mark Pilgrim's) feedparser. feedparser can optionally
import and use mxTidy. Though the option to import and
use mxTidy is disabled (after, effectively, "if 0:"),
evidently py2exe still sees the import and includes
mxTidy code in my resulting py2exe project.

If I enter "python setup.py py2exe -q", py2exe
completes normally; however, if instead I use "python
setup.py py2exe -q -b2", py2exe fails with an error
about mxTidy.pyd -- though there is a message
immediately before about copying that file.

I commented out all lines dealing with mxTidy in
feedparser.py (including especially the import) and -b2
and -b1 now work fine.

Thanks

Allan Wilson

Discussion

  • Thomas Heller

    Thomas Heller - 2005-09-13

    Logged In: YES
    user_id=11105

    Can you try the patch that Gordon Scott posted to the
    py2exe-users mailing list?

     
  • Allan B. Wilson

    Allan B. Wilson - 2005-09-13

    Logged In: YES
    user_id=725330

    I would be happy to try it, but don't know how to locate
    Gordon's patch. I looked under the Patches heading, but saw
    nothing recent there nor any from Gordon.

    Sorry about that! :-)

     
  • Allan B. Wilson

    Allan B. Wilson - 2005-09-14

    Logged In: YES
    user_id=725330

    Well, I finally found "Re: mxDateTime error only when using
    bundled setup" from Gordon, and from the title perhaps it
    does indeed address the problem I'm seeing; however, I could
    not identify any code changes I should try.

     
  • Thomas Heller

    Thomas Heller - 2005-09-15

    Logged In: YES
    user_id=11105

    Replace this code (in the copy_extensions method):
    package = ".".join(item.__name__.split(".")[:-1])
    with this one:
    package = "\\".join(item.__name__.split(".")[:-1])

    This is in the file lib\site-packages\py2exe\build_exe.py,
    near line 380.

     
  • Allan B. Wilson

    Allan B. Wilson - 2005-09-15

    Logged In: YES
    user_id=725330

    That did the trick: Now mxTidy is processed just like
    everything else, so your fix worked.

    Please close this bug as fixed.

    Thanks!

     
  • Thomas Heller

    Thomas Heller - 2005-09-15

    Logged In: YES
    user_id=11105

    Great. Although it was Gordon's fix, in case he reads this,

     
  • Thomas Heller

    Thomas Heller - 2005-09-15
    • status: open --> closed-fixed
     

Log in to post a comment.