[Numpy-discussion] numpy.distutils: building a f2py in a subdir

David Cournapeau david at ar.media.kyoto-u.ac.jp
Sun May 18 06:14:35 EDT 2008


Hi,

    I would like to be able to build a f2py extension in a subdir with 
distutils, that is:

config.add_extension('foo/bar', source = ['foo/bar.pyf'])

But it does not work right now because of the way numpy.distutils finds 
the name of the extension. Replacing:

ext_name = extension.name.split('.')[-1]

by

ext_name = os.path.basename(extension.name.split('.')[-1])

Seems to make it work. Could that break anything in numpy.distutils ? I 
don't see how, but I don't want to touch distutils without being sure it 
won't,

cheers,

David




More information about the NumPy-Discussion mailing list