[Numpy-discussion] Numpy, swig and docstring
Fabrice Silva
silva at lma.cnrs-mrs.fr
Sun Jun 13 08:32:21 EDT 2010
Hi folks,
I am trying to wrap a library with swig, distutils and numpy, and am
facing troubles. In fact, swig documentation mention that it is possible
to mention a module docsstring in the %module directive :
%module(docstring="This is the example module's docstring") example
where example is the name of the module to be generated.
When using numpy.distutils, I get the following error:
building extension "_example" sources
error: mismatch of extension names: example.i provides None but expected
'example'
the build_src command tries to get the module name by using a regular
expression (see numpy/distutils/command/build_src.py)
_swig_module_name_match = re.compile(
r'\s*%module\s*(.*\(\s*package\s*=\s*"(?P<package>[\w_]+)".*\)|)
\s*(?P<name>[\w_]+)',re.I).match
which in fact does not cope with the docstring option.
Is there a simple workaround or should I manually compile (which is
possible in this simple project) ?
Thanks
More information about the NumPy-Discussion
mailing list