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

jvr@users.sourceforge.net jvr@users.sourceforge.net
2003年3月21日 01:27:02 -0800


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv26609
Modified Files:
	bundlebuilder.py 
Log Message:
Patch #681927 from Robin Dunn: add option to add shared libraries or
frameworks to the bundle.
Index: bundlebuilder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/bundlebuilder.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** bundlebuilder.py	20 Mar 2003 21:37:05 -0000	1.21
--- bundlebuilder.py	21 Mar 2003 09:26:59 -0000	1.22
***************
*** 95,98 ****
--- 95,102 ----
 	files = []
 
+ 	# List of shared libraries (dylibs, Frameworks) to bundle with the app
+ 	# will be placed in Contents/Frameworks
+ 	libs = []
+ 
 	# Directory where the bundle will be assembled.
 	builddir = "build"
***************
*** 169,172 ****
--- 173,179 ----
 			files.append((path, pathjoin("Contents", "Resources",
 				os.path.basename(path))))
+ 		for path in self.libs:
+ 			files.append((path, pathjoin("Contents", "Frameworks",
+ 				os.path.basename(path))))
 		if self.symlink:
 			self.message("Making symbolic links", 1)
***************
*** 269,272 ****
--- 276,280 ----
 executable = os.path.join(execdir, "%(executable)s")
 resdir = os.path.join(os.path.dirname(execdir), "Resources")
+ libdir = os.path.join(os.path.dirname(execdir), "Frameworks")
 mainprogram = os.path.join(resdir, "%(mainprogram)s")
 
***************
*** 275,278 ****
--- 283,287 ----
 os.environ["PYTHONHOME"] = resdir
 os.environ["PYTHONEXECUTABLE"] = executable
+ os.environ["DYLD_LIBRARY_PATH"] = libdir
 os.execve(executable, sys.argv, os.environ)
 """
***************
*** 698,701 ****
--- 707,712 ----
 --standalone build a standalone application, which is fully
 independent of a Python installation
+ --lib=FILE shared library or framework to be copied into
+ the bundle
 -x, --exclude=MODULE exclude module (with --standalone)
 -i, --include=MODULE include module (with --standalone)
***************
*** 721,725 ****
 		"mainprogram=", "creator=", "nib=", "plist=", "link",
 		"link-exec", "help", "verbose", "quiet", "argv", "standalone",
! 		"exclude=", "include=", "package=", "strip", "iconfile=")
 
 	try:
--- 732,737 ----
 		"mainprogram=", "creator=", "nib=", "plist=", "link",
 		"link-exec", "help", "verbose", "quiet", "argv", "standalone",
! 		"exclude=", "include=", "package=", "strip", "iconfile=",
! 		"lib=")
 
 	try:
***************
*** 751,754 ****
--- 763,768 ----
 		elif opt == '--iconfile':
 			builder.iconfile = arg
+ 		elif opt == "--lib":
+ 			builder.libs.append(arg)
 		elif opt == "--nib":
 			builder.nibname = arg

AltStyle によって変換されたページ (->オリジナル) /