summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler/gnu.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-12-16 18:41:32 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-12-16 18:41:32 +0000
commit543a1635fcf6d12eae596d5f406fad63263201e7 (patch)
tree5b51695c425fe14da0f696bca51d29beff6a729e /numpy/distutils/fcompiler/gnu.py
parent0c502d1fbbe52bebe164963dccb41b9cd18ae038 (diff)
downloadnumpy-543a1635fcf6d12eae596d5f406fad63263201e7.tar.gz
Add target specific lib dir for gfortran on windows when msvc is the C compiler.
Diffstat (limited to 'numpy/distutils/fcompiler/gnu.py')
-rw-r--r--numpy/distutils/fcompiler/gnu.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py
index 8e86dc387..edadd26c3 100644
--- a/numpy/distutils/fcompiler/gnu.py
+++ b/numpy/distutils/fcompiler/gnu.py
@@ -270,6 +270,21 @@ class Gnu95FCompiler(GnuFCompiler):
flags = GnuFCompiler.get_flags_linker_so(self)
return self._add_arches_for_universal_build(flags)
+ def get_library_dirs(self):
+ opt = GnuFCompiler.get_libraries(self)
+ if sys.platform == 'win32':
+ c_compiler = self.c_compiler
+ if c_compiler and c_compiler.compiler_type == "msvc":
+ target = self.get_target()
+ if target:
+ d = os.path.normpath(self.get_libgcc_dir())
+ root = os.path.join(d, os.pardir, os.pardir, os.pardir, os.pardir)
+ mingwdir = os.path.normpath(os.path.join(root, target, "lib"))
+ full = os.path.join(mingwdir, "libmingwex.a")
+ if os.path.exists(full):
+ opt.append(mingwdir)
+ return opt
+
def get_libraries(self):
opt = GnuFCompiler.get_libraries(self)
if sys.platform == 'darwin':