[Python-checkins] python/dist/src/Lib/plat-mac bundlebuilder.py,1.32,1.33
jvr@users.sourceforge.net
jvr@users.sourceforge.net
Sun, 29 Jun 2003 15:20:29 -0700
Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv11328
Modified Files:
bundlebuilder.py
Log Message:
restore 2.2 compatibility:
- don't use "abc" in aString
- don't reorganize extension modules when not using zipimport
Index: bundlebuilder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/bundlebuilder.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** bundlebuilder.py 29 Jun 2003 21:54:12 -0000 1.32
--- bundlebuilder.py 29 Jun 2003 22:20:26 -0000 1.33
***************
*** 311,314 ****
--- 311,317 ----
]
+ def isFramework():
+ return sys.exec_prefix.find("Python.framework") > 0
+
LIB = os.path.join(sys.prefix, "lib", "python" + sys.version[:3])
***************
*** 401,405 ****
if self.executable is None:
! if not self.standalone:
self.symlink_exec = 1
self.executable = sys.executable
--- 404,408 ----
if self.executable is None:
! if not self.standalone and not isFramework():
self.symlink_exec = 1
self.executable = sys.executable
***************
*** 410,414 ****
self.plist.NSPrincipalClass = "NSApplication"
! if self.standalone and "Python.framework" in sys.exec_prefix:
self.addPythonFramework()
--- 413,417 ----
self.plist.NSPrincipalClass = "NSApplication"
! if self.standalone and isFramework():
self.addPythonFramework()
***************
*** 620,633 ****
# C extension
filename = os.path.basename(path)
! dstpath = name.split(".")[:-1] + [filename]
! if name != "zlib":
! # put all extension module in a separate folder
! # inside Contents/Resources/
! dstpath = pathjoin("ExtensionModules", *dstpath)
! else:
! # zlib is neccesary for bootstrapping, so don't
! # hide it in "ExtensionModules"
! dstpath = pathjoin(*dstpath)
if USE_ZIPIMPORT:
# Python modules are stored in a Zip archive, but put
# extensions in Contents/Resources/. Add a tiny "loader"
--- 623,633 ----
# C extension
filename = os.path.basename(path)
! pathitems = name.split(".")[:-1] + [filename]
! dstpath = pathjoin(*pathitems)
if USE_ZIPIMPORT:
+ if name != "zlib":
+ # neatly pack all extension modules in a subdirectory,
+ # except zlib, since it's neccesary for bootstrapping.
+ dstpath = pathjoin("ExtensionModules", dstpath)
# Python modules are stored in a Zip archive, but put
# extensions in Contents/Resources/. Add a tiny "loader"