views:

92

answers:

1

I have a complex build process to generate a couple of python extension modules (.pyd). I want to include these in my setup.py for use with distutils. The distutils page talks in length about how to add extension modules from source, but I'd want to simply package these precompiled .pyd. What is the best practice to do this?

Eventually, I'd also like to freeze everything in an executable with py2exe. Will I be able to do this if I directly specify the .pyd?

+1  A: 

You could add your extension name to 'includes'

options={
    'py2exe':{'includes':['yourextensionname_without_pyd']}
}

Here is the list of options from py2exe site

S.Mark