Dominique
unread,Jan 19, 2011, 11:01:18 AM1/19/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cython-users
Hi all,
I'm writing a multi-directory Python package with a numpy-distutils-
style setup.py: one setup.py per submodule, one submodule per
directory, and options delegated to submodules. Thus, only the topmost
setup.py calls setup(). All the others do is perform actions of the
form config.add_extension() and config.add_library().
One of my submodules has a Cython interface to a C library. For this
extension, I'd like to only distribute a pyx file.
Another submodule has a f2py interface to a Fortran library. For this
extension, I only distribute the pyf file.
Now the problem is that if the topmost setup.py does
from Cython.Distutils import build_ext
and passes cmdclass={'build_ext': build_ext} to setup(), compilation
of the pyf interface fails with:
error: unknown file type '.pyf'
Since the config.add_extension() commands actually use Numpy's
subclass of Distutil's Extension, I was expecting the compilation of
pyf files to go through.
How can I fix this? Is it possible to use a different build_ext for
different extensions?
Thanks in advance!