Distribute pre-compiled python extension module with distutils

Posted by Toji on Stack Overflow See other posts from Stack Overflow or by Toji
Published on 2010-03-15T02:14:42Z Indexed on 2010/03/15 2:19 UTC
Read the original article Hit count: 502

Filed under:
|
|

Quick one today: I'm learning the in's and out's of Pythons distutils library, and I would like to include a python extension module (.pyd) with my package. I know of course that the recommended way is to have distutils compile the extension at the time the package is created, but this is a fairly complex extension spanning many source files and referencing several external libs so it's going to take some significant playing to get everything working right.

In the meantime I have a known working build of the extension coming out of Visual Studio, and would like to use it in the installer as a temporary solution to allow me to focus on other issues. I can't specify it as a module, however, since those apparently must have an explicit .py extension. How could I indicate in my setup.py that I want to include a pre-compiled extension module?

(Python 3.1, if it matters)

© Stack Overflow or respective owner

Related posts about python

Related posts about python-3.x