[Python-checkins] python/dist/src/Lib/plat-mac bundlebuilder.py,1.18,1.19

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Wed, 05 Mar 2003 06:42:23 -0800


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv4960

Modified Files:
	bundlebuilder.py 
Log Message:
Moved some application-bundle specific code from the BundleBuilder class to
AppBuilder, and set the default type to BNDL (overridden in AppBuilder).

This surfaced when trying to build help bundles.


Index: bundlebuilder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/bundlebuilder.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** bundlebuilder.py	26 Feb 2003 11:27:56 -0000	1.18
--- bundlebuilder.py	5 Mar 2003 14:42:18 -0000	1.19
***************
*** 84,88 ****
  
  	# The type of the bundle.
! 	type = "APPL"
  	# The creator code of the bundle.
  	creator = None
--- 84,88 ----
  
  	# The type of the bundle.
! 	type = "BNDL"
  	# The creator code of the bundle.
  	creator = None
***************
*** 98,104 ****
  	builddir = "build"
  
- 	# platform, name of the subfolder of Contents that contains the executable.
- 	platform = "MacOS"
- 
  	# Make symlinks instead copying files. This is handy during debugging, but
  	# makes the bundle non-distributable.
--- 98,101 ----
***************
*** 116,120 ****
  		# misc (derived) attributes
  		self.bundlepath = pathjoin(self.builddir, self.name + bundleextension)
- 		self.execdir = pathjoin("Contents", self.platform)
  
  		plist = self.plist
--- 113,116 ----
***************
*** 295,298 ****
--- 291,300 ----
  class AppBuilder(BundleBuilder):
  
+ 	# Override type of the bundle.
+ 	type = "BNDL"
+ 
+ 	# platform, name of the subfolder of Contents that contains the executable.
+ 	platform = "MacOS"
+ 
  	# A Python main program. If this argument is given, the main
  	# executable in the bundle will be a small wrapper that invokes
***************
*** 355,358 ****
--- 357,362 ----
  			raise BundleBuilderError, ("must specify either or both of "
  					"'executable' and 'mainprogram'")
+ 
+ 		self.execdir = pathjoin("Contents", self.platform)
  
  		if self.name is not None: