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

jvr@users.sourceforge.net jvr@users.sourceforge.net
Fri, 20 Jun 2003 14:43:39 -0700


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

Modified Files:
	bundlebuilder.py 
Log Message:
- do the right thing with symlinks inside directories we're copying
- move the normpath stuff around a bit
- added dubious special case to addPythonFramework()


Index: bundlebuilder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/bundlebuilder.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** bundlebuilder.py	20 Jun 2003 21:26:55 -0000	1.30
--- bundlebuilder.py	20 Jun 2003 21:43:36 -0000	1.31
***************
*** 172,179 ****
          for path in self.resources:
              files.append((path, pathjoin("Contents", "Resources",
!                 os.path.basename(os.path.normpath(path)))))
          for path in self.libs:
              files.append((path, pathjoin("Contents", "Frameworks",
!                 os.path.basename(os.path.normpath(path)))))
          if self.symlink:
              self.message("Making symbolic links", 1)
--- 172,179 ----
          for path in self.resources:
              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)
***************
*** 489,495 ****
      def addPythonFramework(self):
          # If we're building a standalone app with Python.framework,
!         # include a minimal subset of Python.framework
          frameworkpath = sys.exec_prefix[:sys.exec_prefix.find(
              "Python.framework") + len("Python.framework")]
          version = sys.version[:3]
          frameworkpath = pathjoin(frameworkpath, "Versions", version)
--- 489,502 ----
      def addPythonFramework(self):
          # If we're building a standalone app with Python.framework,
!         # include a minimal subset of Python.framework, *unless*
!         # Python.framework was specified manually in self.libs.
!         for lib in self.libs:
!             if os.path.basename(lib) == "Python.framework":
!                 # a Python.framework was specified as a library
!                 return
! 
          frameworkpath = sys.exec_prefix[:sys.exec_prefix.find(
              "Python.framework") + len("Python.framework")]
+ 
          version = sys.version[:3]
          frameworkpath = pathjoin(frameworkpath, "Versions", version)
***************
*** 694,698 ****
          makedirs(os.path.dirname(dst))
      if os.path.isdir(src):
!         shutil.copytree(src, dst)
      else:
          shutil.copy2(src, dst)
--- 701,705 ----
          makedirs(os.path.dirname(dst))
      if os.path.isdir(src):
!         shutil.copytree(src, dst, symlinks=1)
      else:
          shutil.copy2(src, dst)
***************
*** 795,799 ****
              builder.name = arg
          elif opt in ('-r', '--resource'):
!             builder.resources.append(arg)
          elif opt in ('-f', '--file'):
              srcdst = arg.split(':')
--- 802,806 ----
              builder.name = arg
          elif opt in ('-r', '--resource'):
!             builder.resources.append(os.path.normpath(arg))
          elif opt in ('-f', '--file'):
              srcdst = arg.split(':')
***************
*** 813,817 ****
              builder.iconfile = arg
          elif opt == "--lib":
!             builder.libs.append(arg)
          elif opt == "--nib":
              builder.nibname = arg
--- 820,824 ----
              builder.iconfile = arg
          elif opt == "--lib":
!             builder.libs.append(os.path.normpath(arg))
          elif opt == "--nib":
              builder.nibname = arg