[Python-checkins] CVS: python/dist/src/Mac/Lib/mkcwproject __init__.py,1.11,1.12

Jack Jansen jackjansen@users.sourceforge.net
Fri, 14 Dec 2001 06:31:11 -0800


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

Modified Files:
	__init__.py 
Log Message:
Add default values for options in the class init routine, not in the convenience wrapper function: distutils uses the class directly. Fixes bug #492665.

Index: __init__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject/__init__.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** __init__.py	2001/11/30 14:16:30	1.11
--- __init__.py	2001/12/14 14:31:09	1.12
***************
*** 13,37 ****
  		dictcopy[k] = v
  	#
! 	# Fill in mac-specific values
  	#
  	dictcopy['mac_projectxmlname'] = outputfile + '.xml'
  	dictcopy['mac_exportname'] = os.path.split(outputfile)[1] + '.exp'
- 	if not dictcopy.has_key('mac_outputdir'):
- 		dictcopy['mac_outputdir'] = ':lib:'
- 	if not dictcopy.has_key('stdlibraryflags'):
- 		dictcopy['stdlibraryflags'] = 'Debug'
- 	if not dictcopy.has_key('libraryflags'):
- 		dictcopy['libraryflags'] = 'Debug'
  	if not dictcopy.has_key('mac_dllname'):
  		dictcopy['mac_dllname'] = modulename + '.ppc.slb'
  	if not dictcopy.has_key('mac_targetname'):
  		dictcopy['mac_targetname'] = modulename + '.ppc'
! 	if os.path.isabs(dictcopy['sysprefix']):
! 		dictcopy['mac_sysprefixtype'] = 'Absolute'
! 	else:
! 		dictcopy['mac_sysprefixtype'] = 'Project' # XXX not sure this is right...
! 	#
! 	# Generate the XML for the project
! 	#
  	xmlbuilder = cwxmlgen.ProjectBuilder(dictcopy, templatename=templatename)
  	xmlbuilder.generate()
--- 13,25 ----
  		dictcopy[k] = v
  	#
! 	# Generate the XML for the project
  	#
  	dictcopy['mac_projectxmlname'] = outputfile + '.xml'
  	dictcopy['mac_exportname'] = os.path.split(outputfile)[1] + '.exp'
  	if not dictcopy.has_key('mac_dllname'):
  		dictcopy['mac_dllname'] = modulename + '.ppc.slb'
  	if not dictcopy.has_key('mac_targetname'):
  		dictcopy['mac_targetname'] = modulename + '.ppc'
! 	
  	xmlbuilder = cwxmlgen.ProjectBuilder(dictcopy, templatename=templatename)
  	xmlbuilder.generate()