[Please keep replies on list]

 

I suspect you aren't specifying 'includes' correctly - if you specify a module py2exe can't find, you get an exception.

 

eg, look at the 'samples/simple/setup.py' sample - you need to specify includes like:

"""

py2exe_options = {'includes' : ['foopy']}

 

setup(

    # The first three parameters are not required, if at least a

    # 'version' is given, then a versioninfo resource is built from

    # them and added to the executables.

    version = "0.5.0",

    description = "py2exe sample script",

    name = "py2exe samples",

 

    # targets to build

    windows = ["test_wx.py"],

    console = ["hello.py"],

    options = {'py2exe' : py2exe_options},

    )

"""

 

If you run that, you will get an ImportError that 'foopy' doesn't exist.  If you *are* specifying includes correctly and py2exe doesn't fail, it means py2exe is finding some other module for _xyz rather than the one you expect - check the py2exe output for details.

 

Mark

 

From: - [mailto:midorimiso@yahoo.com.au]
Sent: Tuesday, 21 October 2008 8:05 PM
To: mhammond@skippinet.com.au
Subject: RE: [Py2exe-users] Including pyd/dlls in build process

 

Well, my problem is that py2exe is not including/copying the .pyd file even with an explicit include.   

My directory structure is as such: appdir/moduledir/_xyz.pyd

and the code that imports and references _xyz.pyd directly is also within moduledir. Is there a trick to this or do I have to write a function to copy the required files across?

Thanks for the help,
-sy

--- On Tue, 21/10/08, Mark Hammond <mhammond@skippinet.com.au> wrote:

From: Mark Hammond <mhammond@skippinet.com.au>
Subject: RE: [Py2exe-users] Including pyd/dlls in build process
To: midorimiso@yahoo.com.au, py2exe-users@lists.sourceforge.net
Received: Tuesday, 21 October, 2008, 5:45 PM

py2exe treats a .pyd
 file more as a module than a DLL - thus, normal
'includes' and 'excludes' should do the trick.  If the DLL is
used by the missing .pyd file, simply including the missing .pyd should cause
py2exe to see the .dll file.

Mark

----
From: - [mailto:midorimiso@yahoo.com.au]
Sent: Tuesday, 21 October 2008 3:43 PM
To: py2exe-users@lists.sourceforge.net
Subject: [Py2exe-users] Including pyd/dlls in build process

One of the modules for my app uses functions from a .pyd file. There's an
option to exclude dlls (exclude_dlls) but is there one for including them? The
build process doesn't seem to be copying the .pyd in my module despite
copying the rest of the files (.py). I also need to include a .dll.  How do I
get py2exe to include both .pyd and .dll files?

Thanks,
-sy

Send instant messages to your online friends http://au.messenger.yahoo.com
 



Send instant messages to your online friends http://au.messenger.yahoo.com