[cig-commits] commit: Another fix for the PETScExt package.

Mercurial hg at geodynamics.org
Mon Nov 24 11:22:57 PST 2008


changeset:   61:4af929314a12
user:        LukeHodkinson
date:        Thu Mar 27 23:33:14 2008 +0000
files:       config/SConfig/packages/PETScExt.py
description:
Another fix for the PETScExt package.


diff -r 1e9fabdc2314 -r 4af929314a12 config/SConfig/packages/PETScExt.py
--- a/config/SConfig/packages/PETScExt.py	Thu Mar 27 23:29:56 2008 +0000
+++ b/config/SConfig/packages/PETScExt.py	Thu Mar 27 23:33:14 2008 +0000
@@ -17,25 +17,26 @@ class PETScExt(SConfig.Package):
         self.use_rpath = True
         self.have_define = 'HAVE_PETSCEXT'
 
-    def validate_location(self, location):
-        # Just use whatever architecture PETSc uses.
-        arch = self.pkg_petsc.arch
-        self.arch = arch
+    def generate_locations(self):
+        for loc in SConfig.Package.generate_locations(self):
+            # Just use whatever architecture PETSc uses.
+            arch = self.pkg_petsc.arch
+            self.arch = arch
 
-        # Add the bmake/arch include directory.
-        hdr_dir = os.path.join('bmake', arch)
-        if not os.path.exists(os.path.join(location[0], hdr_dir)):
-            return [0, '', 'No bmake/<arch> directory.']
-        if hdr_dir not in location[1]:
-            location[1] += [hdr_dir]
+            # Add the bmake/arch include directory.
+            hdr_dir = os.path.join('bmake', arch)
+            if not os.path.exists(os.path.join(loc[0], hdr_dir)):
+                continue
+            if hdr_dir not in loc[1]:
+                loc[1] += [hdr_dir]
 
-        # Add the lib/arch library directory.
-        if 'lib' in location[2]:
-            location[2].remove('lib')
-        lib_dir = os.path.join('lib', arch)
-        if not os.path.exists(os.path.join(location[0], lib_dir)):
-            return [0, '', 'No lib/<arch> directory.']
-        if lib_dir not in location[2]:
-            location[2] += [lib_dir]
+            # Add the lib/arch library directory.
+            if 'lib' in loc[2]:
+                loc[2].remove('lib')
+            lib_dir = os.path.join('lib', arch)
+            if not os.path.exists(os.path.join(loc[0], lib_dir)):
+                continue
+            if lib_dir not in loc[2]:
+                loc[2] += [lib_dir]
 
-        return [1, '', '']
+            yield loc



More information about the CIG-COMMITS mailing list