[Python-checkins] python/dist/src/Lib/plat-mac buildtools.py, 1.12, 1.13 bundlebuilder.py, 1.36, 1.37

jackjansen at users.sourceforge.net jackjansen at users.sourceforge.net
Mon Dec 27 16:51:06 CET 2004


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32465/Lib/plat-mac
Modified Files:
	buildtools.py bundlebuilder.py 
Log Message:
Fix for #1091468: DESTROOTed frameworkinstalls fail. Added a --destroot
option to various tools, and do the right thing when we're doing a destroot
install.
Will backport to 2.4 and 2.3.
Index: buildtools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/buildtools.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- buildtools.py	18 Jul 2004 06:14:45 -0000	1.12
+++ buildtools.py	27 Dec 2004 15:51:03 -0000	1.13
@@ -60,7 +60,7 @@
 return file
 
 def process(template, filename, destname, copy_codefragment=0,
- rsrcname=None, others=[], raw=0, progress="default"):
+ rsrcname=None, others=[], raw=0, progress="default", destroot=""):
 
 if progress == "default":
 progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120)
@@ -108,7 +108,7 @@
 except os.error:
 pass
 process_common(template, progress, code, rsrcname, destname, 0,
- copy_codefragment, raw, others, filename)
+ copy_codefragment, raw, others, filename, destroot)
 
 
 def update(template, filename, output):
@@ -130,10 +130,10 @@
 
 
 def process_common(template, progress, code, rsrcname, destname, is_update,
- copy_codefragment, raw=0, others=[], filename=None):
+ copy_codefragment, raw=0, others=[], filename=None, destroot=""):
 if MacOS.runtimemodel == 'macho':
 return process_common_macho(template, progress, code, rsrcname, destname,
- is_update, raw, others, filename)
+ is_update, raw, others, filename, destroot)
 if others:
 raise BuildError, "Extra files only allowed for MachoPython applets"
 # Create FSSpecs for the various files
@@ -265,7 +265,7 @@
 progress.inc(0)
 
 def process_common_macho(template, progress, code, rsrcname, destname, is_update,
- raw=0, others=[], filename=None):
+ raw=0, others=[], filename=None, destroot=""):
 # Check that we have a filename
 if filename is None:
 raise BuildError, "Need source filename on MacOSX"
@@ -302,6 +302,7 @@
 builder.mainprogram = filename
 builder.builddir = destdir
 builder.name = shortname
+ builder.destroot = destroot
 if rsrcname:
 realrsrcname = macresource.resource_pathname(rsrcname)
 builder.files.append((realrsrcname,
Index: bundlebuilder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/bundlebuilder.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- bundlebuilder.py	10 Jul 2003 14:53:27 -0000	1.36
+++ bundlebuilder.py	27 Dec 2004 15:51:03 -0000	1.37
@@ -110,6 +110,9 @@
 
 # Verbosity level.
 verbosity = 1
+ 
+ # Destination root directory
+ destroot = ""
 
 def setup(self):
 # XXX rethink self.name munging, this is brittle.
@@ -445,7 +448,7 @@
 execname = os.path.basename(self.executable)
 execpath = pathjoin(self.execdir, execname)
 if not self.symlink_exec:
- self.files.append((self.executable, execpath))
+ self.files.append((self.destroot + self.executable, execpath))
 self.execpath = execpath
 
 if self.mainprogram is not None:
@@ -828,7 +831,7 @@
 "mainprogram=", "creator=", "nib=", "plist=", "link",
 "link-exec", "help", "verbose", "quiet", "argv", "standalone",
 "exclude=", "include=", "package=", "strip", "iconfile=",
- "lib=", "python=", "semi-standalone", "bundle-id=")
+ "lib=", "python=", "semi-standalone", "bundle-id=", "destroot=")
 
 try:
 options, args = getopt.getopt(sys.argv[1:], shortopts, longopts)
@@ -890,6 +893,8 @@
 builder.includePackages.append(arg)
 elif opt == '--strip':
 builder.strip = 1
+ elif opt == '--destroot':
+ builder.destroot = arg
 
 if len(args) != 1:
 usage("Must specify one command ('build', 'report' or 'help')")


More information about the Python-checkins mailing list

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