Fix for issue #2573: Can't change the framework name on OS X builds
This introduces a new configure option: --with-framework-name=NAME
(defaulting to 'Python'). This allows you to install several copies
of the Python framework with different names (such as a normal build
and a debug build).
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 37974e9..1fd2439 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -199,7 +199,7 @@
dict(
name="PythonApplications",
long_name="GUI Applications",
- source="/Applications/MacPython %(VER)s",
+ source="/Applications/Python %(VER)s",
readme="""\
This package installs IDLE (an interactive Python IDE),
Python Launcher and Build Applet (create application bundles
diff --git a/Mac/BuildScript/resources/ReadMe.txt b/Mac/BuildScript/resources/ReadMe.txt
index 1a6e637..cb00c93 100644
--- a/Mac/BuildScript/resources/ReadMe.txt
+++ b/Mac/BuildScript/resources/ReadMe.txt
@@ -19,7 +19,7 @@
extension modules that open up specific Macintosh technologies
to Python programs (Carbon, AppleScript, Quicktime, more).
-The installer puts the applications in "MacPython $VERSION"
+The installer puts the applications in "Python $VERSION"
in your Applications folder, command-line tools in
/usr/local/bin and the underlying machinery in
$PYTHONFRAMEWORKINSTALLDIR.
diff --git a/Mac/IDLE/Makefile.in b/Mac/IDLE/Makefile.in
index 2f63892..600f1fc 100644
--- a/Mac/IDLE/Makefile.in
+++ b/Mac/IDLE/Makefile.in
@@ -9,6 +9,7 @@
VERSION= @VERSION@
UNIVERSALSDK=@UNIVERSALSDK@
builddir= ../..
+PYTHONFRAMEWORK=@PYTHONFRAMEWORK@
RUNSHARED= @RUNSHARED@
BUILDEXE= @BUILDEXEEXT@
@@ -21,7 +22,7 @@
BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py
-PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
+PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
all: IDLE.app
diff --git a/Mac/Makefile.in b/Mac/Makefile.in
index 8b2e1db..34734d0 100644
--- a/Mac/Makefile.in
+++ b/Mac/Makefile.in
@@ -13,14 +13,16 @@
DESTDIR=
LDFLAGS=@LDFLAGS@
FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@
+PYTHONFRAMEWORK=@PYTHONFRAMEWORK@
+
# These are normally glimpsed from the previous set
bindir=$(prefix)/bin
-PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
+PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
APPINSTALLDIR=$(prefix)/Resources/Python.app
# Variables for installing the "normal" unix binaries
-INSTALLED_PYTHONAPP=$(APPINSTALLDIR)/Contents/MacOS/Python
+INSTALLED_PYTHONAPP=$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)
# Items more-or-less copied from the main Makefile
DIRMODE=755
@@ -103,7 +105,7 @@
pythonw: $(srcdir)/Tools/pythonw.c Makefile
$(CC) $(LDFLAGS) -o $@ $(srcdir)/Tools/pythonw.c \
- -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/Python"'
+ -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"'
install_PythonLauncher:
@@ -155,7 +157,7 @@
esac; \
done; \
done
- $(INSTALL_PROGRAM) $(STRIPFLAG) $(BUILDPYTHON) "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/Python"
+ $(INSTALL_PROGRAM) $(STRIPFLAG) $(BUILDPYTHON) "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"
install_IDLE:
cd IDLE && make install
diff --git a/Mac/Resources/app/Info.plist b/Mac/Resources/app/Info.plist.in
similarity index 85%
rename from Mac/Resources/app/Info.plist
rename to Mac/Resources/app/Info.plist.in
index 387bbed..1233715 100644
--- a/Mac/Resources/app/Info.plist
+++ b/Mac/Resources/app/Info.plist.in
@@ -20,7 +20,7 @@
<key>CFBundleExecutable</key>
<string>Python</string>
<key>CFBundleGetInfoString</key>
- <string>2.5alpha0, (c) 2004 Python Software Foundation.</string>
+ <string>@VERSION@, (c) 2004 Python Software Foundation.</string>
<key>CFBundleHelpBookFolder</key>
<array>
<string>Documentation</string>
@@ -33,21 +33,21 @@
<key>CFBundleIconFile</key>
<string>PythonInterpreter.icns</string>
<key>CFBundleIdentifier</key>
- <string>org.python.python</string>
+ <string>@PYTHONFRAMEWORKIDENTIFIER@.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
- <string>2.5alpha0, (c) 2004 Python Software Foundation.</string>
+ <string>@VERSION@, (c) 2004-2008 Python Software Foundation.</string>
<key>CFBundleName</key>
<string>Python</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.5alpha0</string>
+ <string>@VERSION@</string>
<key>CFBundleSignature</key>
<string>PytX</string>
<key>CFBundleVersion</key>
- <string>2.5alpha0</string>
+ <string>@VERSION@</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
diff --git a/Mac/Resources/app/Resources/English.lproj/InfoPlist.strings b/Mac/Resources/app/Resources/English.lproj/InfoPlist.strings
deleted file mode 100644
index f8a8bc1..0000000
--- a/Mac/Resources/app/Resources/English.lproj/InfoPlist.strings
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/framework/English.lproj/InfoPlist.strings b/Mac/Resources/framework/English.lproj/InfoPlist.strings
deleted file mode 100644
index cc24bfc..0000000
--- a/Mac/Resources/framework/English.lproj/InfoPlist.strings
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/framework/Info.plist b/Mac/Resources/framework/Info.plist.in
similarity index 72%
rename from Mac/Resources/framework/Info.plist
rename to Mac/Resources/framework/Info.plist.in
index 302ff48..a753e88 100644
--- a/Mac/Resources/framework/Info.plist
+++ b/Mac/Resources/framework/Info.plist.in
@@ -9,7 +9,7 @@
<key>CFBundleGetInfoString</key>
<string>Python Runtime and Library</string>
<key>CFBundleIdentifier</key>
- <string>org.python.python</string>
+ <string>@PYTHONFRAMEWORKIDENTIFIER@</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@@ -17,10 +17,12 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>2.5</string>
+ <string>%VERSION%, (c) 2004-2008 Python Software Foundation.</string>
+ <key>CFBundleLongVersionString</key>
+ <string>%VERSION%, (c) 2004-2008 Python Software Foundation.</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>2.5</string>
+ <string>%VERSION%</string>
</dict>
</plist>
diff --git a/Mac/Resources/framework/version.plist b/Mac/Resources/framework/version.plist
deleted file mode 100644
index 7527442..0000000
--- a/Mac/Resources/framework/version.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>BuildVersion</key>
- <string>1</string>
- <key>CFBundleShortVersionString</key>
- <string>2.5alpha0</string>
- <key>CFBundleVersion</key>
- <string>2.5alpha0</string>
- <key>ProjectName</key>
- <string>Python</string>
- <key>ReleaseStatus</key>
- <string>alfa</string>
- <key>SourceVersion</key>
- <string>2.4a0</string>
-</dict>
-</plist>