Using Paver with py2exe

62 views
Skip to first unread message

Chris Bergstresser

unread,
Mar 20, 2010, 4:16:30 PM3/20/10
to pa...@googlegroups.com
Hi all --

I'm trying to use Paver with py2exe, but it doesn't seem to work.
The problem stems from the fact that both py2exe and Paver both patch
distutils.core._Distribution. If I import py2exe before Paver, I get
a "distutils has already been patched by <class py2exe.Distribution at
0x02971C30>" error. If I import them in the reverse order it works,
but trying something simple in my pavement like:

@task
@needs('py2exe.build_exe.py2exe')
def py2exe(options):
print 'Hello'

... gives me "AttributeError: Distribution instance has no attribute
'zipfile'" errors, because the Paver Distribution (and not the patched
py2exe Distribution) gets passed to py2exe.

Anyone know a way around this?

-- Chris

Kevin Dangoor

unread,
Mar 22, 2010, 1:03:11 PM3/22/10
to pa...@googlegroups.com
I would recommend patching paver.setuputils to look for py2exe and try to incorporate it properly. On the one hand, that's pretty hacky seeming... on the other hand, I'm not sure if there are any other good choices.

I understand that there's some work being done now on distutils2 and we can hope that the situation improves there.

Kevin


--
You received this message because you are subscribed to the Google Groups "paver" group.
To post to this group, send email to pa...@googlegroups.com.
To unsubscribe from this group, send email to paver+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/paver?hl=en.




--
Kevin Dangoor

work: http://labs.mozilla.com/
email: k...@blazingthings.com
blog: http://www.BlueSkyOnMars.com
Reply all
Reply to author
Forward
0 new messages