Author: KirkMcDonald
Date: 2008-01-04 08:24:18 +0000 (Fri, 04 Jan 2008)
New Revision: 743

Modified:
   trunk/pysoy/setup.py
Log:
Compilation now aborts if Pyrex reports an error.

Modified: trunk/pysoy/setup.py
===================================================================
--- trunk/pysoy/setup.py        2008-01-04 07:42:00 UTC (rev 742)
+++ trunk/pysoy/setup.py        2008-01-04 08:24:18 UTC (rev 743)
@@ -138,6 +138,7 @@
          os.stat(pxdsource_path)[ST_MTIME] > newestpxd :
         newestpxd = os.stat(pxdsource_path)[ST_MTIME]
 
+  error = False
   for pyxsource in pyrex_sources:
     csource = os.path.splitext(pyxsource)[0] + '.c'
     if os.path.isfile(csource) :
@@ -165,9 +166,14 @@
     if newestpxd > ctime or newestpxi > ctime or pyxtime > ctime :
       extname = os.path.splitext(pyxsource)[0].split('/')[-1][4:]
       print "processing '%s' extension" % extname
-      Main.compile(pyxsource, options)
+      result = Main.compile(pyxsource, options)
+      if result.num_errors:
+        error = True
 
+  if error:
+    raise Exception("Error compiling Pyrex sources: Aborting compilation.")
 
+
 setup(
   name             = 'PySoy',
   version          = version,

_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to