so, what would the setup script look like for something like this?

if i do:

sources = ['file1.pyx', 'file2.pyx', ... ]

setup(
    cmdclass = {'build_ext': build_ext},
    ext_modules = [Extension("mymodule", sourcefiles,
                                include_dirs=include_dirs,
                                library_dirs=library_dirs,
                                libraries = libraries)])

it fails.

but if i build each module separately, everything works. i.e.:

sources = ['file1.pyx']

setup(
    cmdclass = {'build_ext': build_ext},
    ext_modules = [Extension("mymodule1", sourcefiles,
                                include_dirs=include_dirs,
                                library_dirs=library_dirs,
                                libraries = libraries)])

^^^repeat the above for each module.


What I want to be able to do, is have all of my multiple .pyx and .pxd files
compiled and built into a single  .pyd

Is that possible?

Chris


On Wed, May 20, 2009 at 8:35 PM, Greg Ewing <[email protected]>wrote:

> Chris Colbert wrote:
>
> > Is there a way to properly compile everything into a single .pyd,
>
> You can use include statements to split a .pyx into
> multiple files, but I wouldn't recommend that, because
> it makes it hard for the reader to tell where things
> are defined.
>
> Also, separate modules means there's less to recompile
> when you change one of the implementation files, and
> it seems that compiling a number of small C files can
> sometimes be faster than compiling a single large C
> file of the same total size.
>
> --
> Greg
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to