[Numpy-svn] r6147 - trunk/numpy/distutils/fcompiler

numpy-svn@scip... numpy-svn@scip...
Tue Dec 16 12:41:39 CST 2008


Author: cdavid
Date: 2008-12-16 12:41:32 -0600 (Tue, 16 Dec 2008)
New Revision: 6147

Modified:
   trunk/numpy/distutils/fcompiler/gnu.py
Log:
Add target specific lib dir for gfortran on windows when msvc is the C compiler.

Modified: trunk/numpy/distutils/fcompiler/gnu.py
===================================================================
--- trunk/numpy/distutils/fcompiler/gnu.py	2008-12-16 18:32:41 UTC (rev 6146)
+++ trunk/numpy/distutils/fcompiler/gnu.py	2008-12-16 18:41:32 UTC (rev 6147)
@@ -270,6 +270,21 @@
         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':



More information about the Numpy-svn mailing list