[csw-devel] SF.net SVN: gar:[21554] csw/mgar/pkg/cswclassutils/trunk/files/ CSWcswclassutils.i.cswpycompile

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu Jul 25 22:40:17 CEST 2013


Revision: 21554
          http://gar.svn.sourceforge.net/gar/?rev=21554&view=rev
Author:   wahwah
Date:     2013-07-25 20:40:11 +0000 (Thu, 25 Jul 2013)
Log Message:
-----------
cswclassutils/trunk: Better diagnostics for compilation issues.

Modified Paths:
--------------
    csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswpycompile

Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswpycompile
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswpycompile	2013-07-25 13:22:13 UTC (rev 21553)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswpycompile	2013-07-25 20:40:11 UTC (rev 21554)
@@ -25,10 +25,10 @@
 
 
 TMPDIR=/var/opt/csw/cswclassutils
-[ -d "$TMPDIR" ] || mkdir -p "$TMPDIR"
+mkdir -p "$TMPDIR"
 TMPPY=$TMPDIR/pycomp.$$.`date +%Y%m%d%H%M%S`.py
 
-cat <<EOF > $TMPPY
+cat > $TMPPY <<EOF
 import py_compile
 
 pyfiles = [
@@ -53,8 +53,8 @@
 for f in pyfiles:
 	try:
 		py_compile.compile(f, doraise=True)
-	except py_compile.PyCompileError:
-		print "Error compiling: %s" % f
+	except py_compile.PyCompileError as e:
+    print 'Error compiling %s: %s' % (f, e)
 
 EOF
 
@@ -63,7 +63,7 @@
     echo "Check your Python installation."
     exit 2
 fi
-    
+
 echo "Compiling py files to normal bytecode ..."
 ${PY_BINDIR}/python -Wi -t $TMPPY
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list