[Python-checkins] python/dist/src/Mac/Lib buildtools.py,1.13,1.14

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Fri, 02 Aug 2002 07:04:18 -0700


Update of /cvsroot/python/python/dist/src/Mac/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv3006

Modified Files:
	buildtools.py 
Log Message:
- Slightly better error message in case of syntax errors in the script.
- The applet .rsrc file should be called python.rsrc, it is not based on the
  applet name.


Index: buildtools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Lib/buildtools.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** buildtools.py	20 Jun 2002 20:42:07 -0000	1.13
--- buildtools.py	2 Aug 2002 14:04:15 -0000	1.14
***************
*** 84,89 ****
  	try:
  		code = compile(text, filename, "exec")
! 	except (SyntaxError, EOFError):
! 		raise BuildError, "Syntax error in script %s" % `filename`
  	
  	# Set the destination file name. Note that basename
--- 84,91 ----
  	try:
  		code = compile(text, filename, "exec")
! 	except SyntaxError, arg:
! 		raise BuildError, "Syntax error in script %s: %s" % (filename, arg)
! 	except EOFError:
! 		raise BuildError, "End-of-file in script %s" % (filename,)
  	
  	# Set the destination file name. Note that basename
***************
*** 342,346 ****
  		progress.label("Copy resources...")
  		progress.set(20)
! 	resfilename = '%s.rsrc' % shortname
  	try:
  		output = Res.FSOpenResourceFile(
--- 344,348 ----
  		progress.label("Copy resources...")
  		progress.set(20)
! 	resfilename = 'python.rsrc'  # XXXX later: '%s.rsrc' % shortname
  	try:
  		output = Res.FSOpenResourceFile(