[Numpy-discussion] FCompiler and runtime library dirs

Lisandro Dalcin dalcinl@gmail....
Thu Aug 6 16:48:45 CDT 2009

Hi, folks, Using NumPy 1.3.0 from Fedora 11, though this issue likely
applies to current trunk (I've not actually tested, just taken a look
at the sources)

As numpy.distutils.FCompiler inherits from
distutils.ccompiler.CCompiler, the method
"runtime_library_dir_option()" fails with NotImplementedError. I had
to add the monkeypatch pasted below to a setup.py script (full code at
in order to get things working (wiht GCC on Linux):

from numpy.distutils.fcompiler     import FCompiler
from numpy.distutils.unixccompiler import UnixCCompiler
FCompiler.runtime_library_dir_option = \

Do any of you have an idea about how to properly fix this issue in
numpy? I'm tempted to re-use the UnixCompiler implementation in POSIX
(including Mac OS X?), just to save some lines and do not repeat that
code in every FCompiler subclass... Comments?

Lisandro Dalcín
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594

More information about the NumPy-Discussion mailing list