summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/bundlebuilder.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-03-05 14:42:18 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-03-05 14:42:18 (GMT)
commitcc81b807106e82ad71d8dfae1c4edf9c77b4c72c (patch)
treeb36959e0dadc96ff358aa044cff6bbf982005c51 /Lib/plat-mac/bundlebuilder.py
parent9c20615d4fd0e61437b7178e664768c202cee3b2 (diff)
downloadcpython-cc81b807106e82ad71d8dfae1c4edf9c77b4c72c.zip
cpython-cc81b807106e82ad71d8dfae1c4edf9c77b4c72c.tar.gz
cpython-cc81b807106e82ad71d8dfae1c4edf9c77b4c72c.tar.bz2
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.
Diffstat (limited to 'Lib/plat-mac/bundlebuilder.py')
-rwxr-xr-xLib/plat-mac/bundlebuilder.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/Lib/plat-mac/bundlebuilder.py b/Lib/plat-mac/bundlebuilder.py
index 8502f81..cd370fd 100755
--- a/Lib/plat-mac/bundlebuilder.py
+++ b/Lib/plat-mac/bundlebuilder.py
@@ -83,7 +83,7 @@ class BundleBuilder(Defaults):
CFBundleInfoDictionaryVersion = "6.0")
# The type of the bundle.
- type = "APPL"
+ type = "BNDL"
# The creator code of the bundle.
creator = None
@@ -97,9 +97,6 @@ class BundleBuilder(Defaults):
# Directory where the bundle will be assembled.
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.
symlink = 0
@@ -115,7 +112,6 @@ class BundleBuilder(Defaults):
bundleextension = ext
# misc (derived) attributes
self.bundlepath = pathjoin(self.builddir, self.name + bundleextension)
- self.execdir = pathjoin("Contents", self.platform)
plist = self.plist
plist.CFBundleName = self.name
@@ -294,6 +290,12 @@ execfile(os.path.join(os.path.split(__file__)[0], "%(realmainprogram)s"))
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
# the main program. (XXX Discuss why.)
@@ -355,6 +357,8 @@ class AppBuilder(BundleBuilder):
raise BundleBuilderError, ("must specify either or both of "
"'executable' and 'mainprogram'")
+ self.execdir = pathjoin("Contents", self.platform)
+
if self.name is not None:
pass
elif self.mainprogram is not None: