summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mac/Extras.ReadMe.txt (renamed from Mac/OSX/Extras.ReadMe.txt)0
-rw-r--r--Mac/Extras.install.py (renamed from Mac/OSX/Extras.install.py)0
-rw-r--r--Mac/Icons/Disk Image.icns (renamed from Mac/OSX/Icons/Disk Image.icns)bin50703 -> 50703 bytes
-rw-r--r--Mac/Icons/IDLE.icns (renamed from Mac/OSX/Icons/IDLE.icns)bin53456 -> 53456 bytes
-rw-r--r--Mac/Icons/Python Folder.icns (renamed from Mac/OSX/Icons/Python Folder.icns)bin133608 -> 133608 bytes
-rw-r--r--Mac/Icons/PythonCompiled.icns (renamed from Mac/OSX/Icons/PythonCompiled.icns)bin60777 -> 60777 bytes
-rw-r--r--Mac/Icons/PythonLauncher.icns (renamed from Mac/OSX/Icons/PythonLauncher.icns)bin42658 -> 42658 bytes
-rw-r--r--Mac/Icons/PythonSource.icns (renamed from Mac/OSX/Icons/PythonSource.icns)bin54522 -> 54522 bytes
-rw-r--r--Mac/Icons/ReadMe.txt (renamed from Mac/OSX/Icons/ReadMe.txt)0
-rw-r--r--Mac/Makefile.in (renamed from Mac/OSX/Makefile.in)58
-rw-r--r--Mac/OSX/BuildScript/README.txt35
-rwxr-xr-xMac/OSX/BuildScript/build-installer.py1014
-rw-r--r--Mac/OSX/BuildScript/ncurses-5.5.patch36
-rw-r--r--Mac/OSX/BuildScript/resources/ReadMe.txt31
-rw-r--r--Mac/OSX/BuildScript/resources/Welcome.rtf15
-rw-r--r--Mac/OSX/BuildScript/resources/background.jpgbin45421 -> 0 bytes
-rwxr-xr-xMac/OSX/BuildScript/scripts/postflight.documentation12
-rwxr-xr-xMac/OSX/BuildScript/scripts/postflight.framework33
-rwxr-xr-xMac/OSX/BuildScript/scripts/postflight.patch-profile71
-rw-r--r--Mac/OSX/Doc/HelpIndexingTool/Help_Indexing_Tool_Suite.py110
-rw-r--r--Mac/OSX/Doc/HelpIndexingTool/Miscellaneous_Standards.py49
-rw-r--r--Mac/OSX/Doc/HelpIndexingTool/Required_Suite.py32
-rw-r--r--Mac/OSX/Doc/HelpIndexingTool/Standard_Suite.py343
-rw-r--r--Mac/OSX/Doc/HelpIndexingTool/__init__.py78
-rw-r--r--Mac/OSX/Doc/HelpIndexingTool/odds_and_ends.py49
-rw-r--r--Mac/OSX/Doc/README35
-rw-r--r--Mac/OSX/Doc/setup.py214
-rw-r--r--Mac/OSX/IDLE/Info.plist55
-rw-r--r--Mac/OSX/IDLE/Makefile.in54
-rw-r--r--Mac/OSX/IDLE/config-extensions.def88
-rw-r--r--Mac/OSX/IDLE/config-main.def79
-rw-r--r--Mac/OSX/IDLE/idlemain.py27
-rw-r--r--Mac/OSX/PythonLauncher/English.lproj/Credits.rtf30
-rw-r--r--Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/classes.nib12
-rw-r--r--Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/info.nib21
-rw-r--r--Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/objects.nibbin5016 -> 0 bytes
-rw-r--r--Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/classes.nib26
-rw-r--r--Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/info.nib16
-rw-r--r--Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/objects.nibbin4845 -> 0 bytes
-rw-r--r--Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/classes.nib26
-rw-r--r--Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/info.nib16
-rw-r--r--Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/objects.nibbin5882 -> 0 bytes
-rwxr-xr-xMac/OSX/PythonLauncher/FileSettings.h64
-rwxr-xr-xMac/OSX/PythonLauncher/FileSettings.m298
-rw-r--r--Mac/OSX/PythonLauncher/Info.plist65
-rw-r--r--Mac/OSX/PythonLauncher/Makefile.in78
-rw-r--r--Mac/OSX/PythonLauncher/MyAppDelegate.h15
-rw-r--r--Mac/OSX/PythonLauncher/MyAppDelegate.m96
-rwxr-xr-xMac/OSX/PythonLauncher/MyDocument.h41
-rwxr-xr-xMac/OSX/PythonLauncher/MyDocument.m175
-rw-r--r--Mac/OSX/PythonLauncher/PreferenceWindow.nib/classes.nib26
-rw-r--r--Mac/OSX/PythonLauncher/PreferenceWindow.nib/info.nib16
-rw-r--r--Mac/OSX/PythonLauncher/PreferenceWindow.nib/objects.nibbin5882 -> 0 bytes
-rw-r--r--Mac/OSX/PythonLauncher/PreferencesWindowController.h38
-rw-r--r--Mac/OSX/PythonLauncher/PreferencesWindowController.m121
-rw-r--r--Mac/OSX/PythonLauncher/doscript.h12
-rw-r--r--Mac/OSX/PythonLauncher/doscript.m118
-rw-r--r--Mac/OSX/PythonLauncher/factorySettings.plist87
-rwxr-xr-xMac/OSX/PythonLauncher/main.m17
-rw-r--r--Mac/OSX/Tools/pythonw.c17
-rw-r--r--Mac/OSX/fixapplepython23.py118
-rw-r--r--Mac/README (renamed from Mac/OSX/README)0
-rw-r--r--Mac/Resources/app/Info.plist (renamed from Mac/OSXResources/app/Info.plist)0
-rw-r--r--Mac/Resources/app/PkgInfo (renamed from Mac/OSXResources/app/PkgInfo)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/PackageManager.gif)bin6087 -> 6087 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/community.html (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/community.html)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/doc/index.html)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/finder.html (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/finder.html)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/gui.html (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/gui.html)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/IDE.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/IDE.gif)bin10249 -> 10249 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif)bin15578 -> 15578 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/hello_world.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/hello_world.gif)bin15681 -> 15681 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/index.html (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/index.html)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif)bin50595 -> 50595 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif)bin25978 -> 25978 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif)bin20606 -> 20606 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif)bin21808 -> 21808 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/output_window.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/output_window.gif)bin37660 -> 37660 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif)bin26559 -> 26559 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif)bin14134 -> 14134 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif)bin12850 -> 12850 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/index.html (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/intro.html (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/packman.html (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/packman.html)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/python.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/python.gif)bin6389 -> 6389 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/pythonsmall.gif)bin138 -> 138 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/shell.html (renamed from Mac/OSXResources/app/Resources/English.lproj/Documentation/shell.html)0
-rw-r--r--Mac/Resources/app/Resources/English.lproj/InfoPlist.strings (renamed from Mac/OSXResources/app/Resources/English.lproj/InfoPlist.strings)bin656 -> 656 bytes
-rw-r--r--Mac/Resources/app/Resources/PythonApplet.icns (renamed from Mac/OSXResources/app/Resources/PythonApplet.icns)bin63136 -> 63136 bytes
-rw-r--r--Mac/Resources/app/Resources/PythonInterpreter.icns (renamed from Mac/OSXResources/app/Resources/PythonInterpreter.icns)bin42658 -> 42658 bytes
-rw-r--r--Mac/Resources/framework/English.lproj/InfoPlist.strings (renamed from Mac/OSXResources/framework/English.lproj/InfoPlist.strings)bin358 -> 358 bytes
-rw-r--r--Mac/Resources/framework/Info.plist (renamed from Mac/OSXResources/framework/Info.plist)0
-rw-r--r--Mac/Resources/framework/version.plist (renamed from Mac/OSXResources/framework/version.plist)0
-rw-r--r--Mac/Resources/iconsrc/IDE.psd (renamed from Mac/OSXResources/iconsrc/IDE.psd)bin83876 -> 83876 bytes
-rw-r--r--Mac/Resources/iconsrc/PackageManager.psd (renamed from Mac/OSXResources/iconsrc/PackageManager.psd)bin71056 -> 71056 bytes
-rw-r--r--Mac/Resources/iconsrc/PythonApplet.psd (renamed from Mac/OSXResources/iconsrc/PythonApplet.psd)bin41543 -> 41543 bytes
-rwxr-xr-xMac/Resources/iconsrc/PythonCompiled.psd (renamed from Mac/OSXResources/iconsrc/PythonCompiled.psd)bin76118 -> 76118 bytes
-rwxr-xr-xMac/Resources/iconsrc/PythonIcon.psd (renamed from Mac/OSXResources/iconsrc/PythonIcon.psd)bin67236 -> 67236 bytes
-rwxr-xr-xMac/Resources/iconsrc/PythonSource.psd (renamed from Mac/OSXResources/iconsrc/PythonSource.psd)bin62075 -> 62075 bytes
-rw-r--r--Mac/Resources/iconsrc/PythonWSource.psd (renamed from Mac/OSXResources/iconsrc/PythonWSource.psd)bin64185 -> 64185 bytes
101 files changed, 25 insertions, 4042 deletions
diff --git a/Mac/OSX/Extras.ReadMe.txt b/Mac/Extras.ReadMe.txt
index 2d7fd42..2d7fd42 100644
--- a/Mac/OSX/Extras.ReadMe.txt
+++ b/Mac/Extras.ReadMe.txt
diff --git a/Mac/OSX/Extras.install.py b/Mac/Extras.install.py
index ce00af3..ce00af3 100644
--- a/Mac/OSX/Extras.install.py
+++ b/Mac/Extras.install.py
diff --git a/Mac/OSX/Icons/Disk Image.icns b/Mac/Icons/Disk Image.icns
index 35f16bf..35f16bf 100644
--- a/Mac/OSX/Icons/Disk Image.icns
+++ b/Mac/Icons/Disk Image.icns
Binary files differ
diff --git a/Mac/OSX/Icons/IDLE.icns b/Mac/Icons/IDLE.icns
index c12c9da..c12c9da 100644
--- a/Mac/OSX/Icons/IDLE.icns
+++ b/Mac/Icons/IDLE.icns
Binary files differ
diff --git a/Mac/OSX/Icons/Python Folder.icns b/Mac/Icons/Python Folder.icns
index ae766ee..ae766ee 100644
--- a/Mac/OSX/Icons/Python Folder.icns
+++ b/Mac/Icons/Python Folder.icns
Binary files differ
diff --git a/Mac/OSX/Icons/PythonCompiled.icns b/Mac/Icons/PythonCompiled.icns
index 7d9f320..7d9f320 100644
--- a/Mac/OSX/Icons/PythonCompiled.icns
+++ b/Mac/Icons/PythonCompiled.icns
Binary files differ
diff --git a/Mac/OSX/Icons/PythonLauncher.icns b/Mac/Icons/PythonLauncher.icns
index e09fd38..e09fd38 100644
--- a/Mac/OSX/Icons/PythonLauncher.icns
+++ b/Mac/Icons/PythonLauncher.icns
Binary files differ
diff --git a/Mac/OSX/Icons/PythonSource.icns b/Mac/Icons/PythonSource.icns
index 9e35c1e..9e35c1e 100644
--- a/Mac/OSX/Icons/PythonSource.icns
+++ b/Mac/Icons/PythonSource.icns
Binary files differ
diff --git a/Mac/OSX/Icons/ReadMe.txt b/Mac/Icons/ReadMe.txt
index 226836a..226836a 100644
--- a/Mac/OSX/Icons/ReadMe.txt
+++ b/Mac/Icons/ReadMe.txt
diff --git a/Mac/OSX/Makefile.in b/Mac/Makefile.in
index d0e39e4..82514b2 100644
--- a/Mac/OSX/Makefile.in
+++ b/Mac/Makefile.in
@@ -3,25 +3,23 @@
# commandline in that case.
VERSION=@VERSION@
-builddir = ../..
-srcdir = @srcdir@
+builddir = ..
+srcdir=@srcdir@
prefix=/Library/Frameworks/Python.framework/Versions/$(VERSION)
LIBDEST=$(prefix)/lib/python$(VERSION)
-BUILDPYTHON=$(builddir)/python.exe
+RUNSHARED=@RUNSHARED@
+BUILDEXE=@BUILDEXEEXT@
+BUILDPYTHON=$(builddir)/python$(BUILDEXE)
DESTDIR=
-LDFLAGS= @LDFLAGS@
+LDFLAGS=@LDFLAGS@
FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@
# These are normally glimpsed from the previous set
-bindir=@exec_prefix@/bin
+bindir=$(prefix)/bin
PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
APPINSTALLDIR=$(prefix)/Resources/Python.app
# Variables for installing the "normal" unix binaries
-INSTALLED_PYDOC=$(prefix)/bin/pydoc
-INSTALLED_IDLE=$(prefix)/bin/idle
-INSTALLED_PYTHON=$(prefix)/bin/python
-INSTALLED_PYTHONW=$(prefix)/bin/pythonw
INSTALLED_PYTHONAPP=$(APPINSTALLDIR)/Contents/MacOS/Python
# Items more-or-less copied from the main Makefile
@@ -36,15 +34,15 @@ LN=@LN@
STRIPFLAG=-s
CPMAC=/Developer/Tools/CpMac
-APPTEMPLATE=$(srcdir)/../OSXResources/app
+APPTEMPLATE=$(srcdir)/Resources/app
APPSUBDIRS=MacOS Resources Resources/English.lproj \
Resources/English.lproj/Documentation \
Resources/English.lproj/Documentation/doc \
Resources/English.lproj/Documentation/ide
-DOCDIR=$(srcdir)/../OSXResources/app/Resources/English.lproj/Documentation
+DOCDIR=$(srcdir)/Resources/app/Resources/English.lproj/Documentation
DOCINDEX=$(DOCDIR)/"Documentation idx"
-CACHERSRC=$(srcdir)/../scripts/cachersrc.py
-compileall=$(srcdir)/../../Lib/compileall.py
+CACHERSRC=$(srcdir)/scripts/cachersrc.py
+compileall=$(srcdir)/../Lib/compileall.py
installapps: install_Python install_BuildApplet install_PythonLauncher \
install_IDLE checkapplepython install_pythonw install_versionedtools
@@ -163,11 +161,11 @@ install_IDLE:
cd IDLE && make install
install_BuildApplet:
- $(BUILDPYTHON) $(srcdir)/../scripts/BuildApplet.py \
+ $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \
--destroot "$(DESTDIR)" \
--python $(INSTALLED_PYTHONAPP) \
--output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \
- $(srcdir)/../scripts/BuildApplet.py
+ $(srcdir)/scripts/BuildApplet.py
MACLIBDEST=$(LIBDEST)/plat-mac
MACTOOLSDEST=$(prefix)/Mac/Tools
@@ -225,29 +223,25 @@ installmacsubtree:
done
- $(BUILDPYTHON) $(CACHERSRC) -v $(DESTDIR)$(MACLIBDEST) $(DESTDIR)$(MACTOOLSDEST)
- $(BUILDPYTHON) -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
- $(BUILDPYTHON) -O -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
+ $(RUNSHARED) $(BUILDPYTHON) $(CACHERSRC) -v $(DESTDIR)$(MACLIBDEST) $(DESTDIR)$(MACTOOLSDEST)
+ $(RUNSHARED) $(BUILDPYTHON) -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
+ $(RUNSHARED) $(BUILDPYTHON) -O -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
-#
-# We use the full name here in stead of $(INSTALLED_PYTHONAPP), because
-# the latter may be overridden by Makefile.jaguar when building for a pre-installed
-$(APPINSTALLDIR)/Contents/MacOS/Python: install_Python
-
-# $(INSTALLED_PYTHON) has to be done by the main Makefile, we cannot do that here.
-# At least this rule will give an error if it doesn't exist.
+$(INSTALLED_PYTHONAPP): install_Python
-installextras:
+installextras: $(srcdir)/Extras.ReadMe.txt $(srcdir)/Extras.install.py
$(INSTALL) -d "$(DESTDIR)$(PYTHONAPPSDIR)/Extras"
- $(INSTALL) $(srcdir)/Mac/OSX/Extras.ReadMe.txt "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/ReadMe.txt"
- $(BUILDPYTHON) $(srcdir)/Mac/OSX/Extras.install.py $(srcdir)/Demo \
+ $(INSTALL) $(srcdir)/Extras.ReadMe.txt "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/ReadMe.txt"
+ $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/../Demo \
"$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo"
+ $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/Demo \
+ "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo.Mac"
-checkapplepython:
- @if ! $(BUILDPYTHON) $(srcdir)/fixapplepython23.py -n; then \
+checkapplepython: $(srcdir)/Tools/fixapplepython23.py
+ @if ! $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Tools/fixapplepython23.py -n; then \
echo "* WARNING: Apple-installed Python 2.3 will have trouble building extensions from now on."; \
- echo "* WARNING: Run $(srcdir)/fixapplepython23.py with \"sudo\" to fix this."; \
+ echo "* WARNING: Run $(srcdir)/Tools/fixapplepython23.py with \"sudo\" to fix this."; \
fi
@@ -255,5 +249,3 @@ clean:
rm pythonw
cd PythonLauncher && make clean
cd IDLE && make clean
-
-
diff --git a/Mac/OSX/BuildScript/README.txt b/Mac/OSX/BuildScript/README.txt
deleted file mode 100644
index c556de83..0000000
--- a/Mac/OSX/BuildScript/README.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Building a MacPython distribution
-=================================
-
-The ``build-install.py`` script creates MacPython distributions, including
-sleepycat db4, sqlite3 and readline support. It builds a complete
-framework-based Python out-of-tree, installs it in a funny place with
-$DESTROOT, massages that installation to remove .pyc files and such, creates
-an Installer package from the installation plus other files in ``resources``
-and ``scripts`` and placed that on a ``.dmg`` disk image.
-
-Here are the steps you ned to follow to build a MacPython installer:
-
-- Run ``./build-installer.py``. Optionally you can pass a number of arguments
- to specify locations of various files. Please see the top of
- ``build-installer.py`` for its usage.
-- When done the script will tell you where the DMG image is.
-
-The script needs to be run on Mac OS X 10.4 with Xcode 2.2 or later and
-the 10.4u SDK.
-
-When all is done, announcements can be posted to at least the following
-places:
-- pythonmac-sig@python.org
-- python-dev@python.org
-- python-announce@python.org
-- archivist@info-mac.org
-- adcnews@apple.com
-- news@macnn.com
-- http://www.macupdate.com
-- http://guide.apple.com/usindex.lasso
-- http://www.apple.com/downloads/macosx/submit
-- http://www.versiontracker.com/ (userid Jack.Jansen@oratrix.com)
-- http://www.macshareware.net (userid jackjansen)
-
-Also, check out Stephan Deibels http://pythonology.org/market contact list
diff --git a/Mac/OSX/BuildScript/build-installer.py b/Mac/OSX/BuildScript/build-installer.py
deleted file mode 100755
index b24f5dc..0000000
--- a/Mac/OSX/BuildScript/build-installer.py
+++ /dev/null
@@ -1,1014 +0,0 @@
-#!/usr/bin/python2.3
-"""
-This script is used to build the "official unofficial" universal build on
-Mac OS X. It requires Mac OS X 10.4, Xcode 2.2 and the 10.4u SDK to do its
-work.
-
-Please ensure that this script keeps working with Python 2.3, to avoid
-bootstrap issues (/usr/bin/python is Python 2.3 on OSX 10.4)
-
-Usage: see USAGE variable in the script.
-"""
-import platform, os, sys, getopt, textwrap, shutil, urllib2, stat, time, pwd
-
-INCLUDE_TIMESTAMP=1
-VERBOSE=1
-
-from plistlib import Plist
-
-import MacOS
-import Carbon.File
-import Carbon.Icn
-import Carbon.Res
-from Carbon.Files import kCustomIconResource, fsRdWrPerm, kHasCustomIcon
-from Carbon.Files import kFSCatInfoFinderInfo
-
-try:
- from plistlib import writePlist
-except ImportError:
- # We're run using python2.3
- def writePlist(plist, path):
- plist.write(path)
-
-def shellQuote(value):
- """
- Return the string value in a form that can savely be inserted into
- a shell command.
- """
- return "'%s'"%(value.replace("'", "'\"'\"'"))
-
-def grepValue(fn, variable):
- variable = variable + '='
- for ln in open(fn, 'r'):
- if ln.startswith(variable):
- value = ln[len(variable):].strip()
- return value[1:-1]
-
-def getVersion():
- return grepValue(os.path.join(SRCDIR, 'configure'), 'PACKAGE_VERSION')
-
-def getFullVersion():
- fn = os.path.join(SRCDIR, 'Include', 'patchlevel.h')
- for ln in open(fn):
- if 'PY_VERSION' in ln:
- return ln.split()[-1][1:-1]
-
- raise RuntimeError, "Cannot find full version??"
-
-# The directory we'll use to create the build, will be erased and recreated
-WORKDIR="/tmp/_py"
-
-# The directory we'll use to store third-party sources, set this to something
-# else if you don't want to re-fetch required libraries every time.
-DEPSRC=os.path.join(WORKDIR, 'third-party')
-DEPSRC=os.path.expanduser('~/Universal/other-sources')
-
-# Location of the preferred SDK
-SDKPATH="/Developer/SDKs/MacOSX10.4u.sdk"
-#SDKPATH="/"
-
-# Source directory (asume we're in Mac/OSX/Dist)
-SRCDIR=os.path.dirname(
- os.path.dirname(
- os.path.dirname(
- os.path.dirname(
- os.path.abspath(__file__
- )))))
-
-USAGE=textwrap.dedent("""\
- Usage: build_python [options]
-
- Options:
- -? or -h: Show this message
- -b DIR
- --build-dir=DIR: Create build here (default: %(WORKDIR)r)
- --third-party=DIR: Store third-party sources here (default: %(DEPSRC)r)
- --sdk-path=DIR: Location of the SDK (default: %(SDKPATH)r)
- --src-dir=DIR: Location of the Python sources (default: %(SRCDIR)r)
-""")% globals()
-
-
-# Instructions for building libraries that are necessary for building a
-# batteries included python.
-LIBRARY_RECIPES=[
- dict(
- # Note that GNU readline is GPL'd software
- name="GNU Readline 5.1.4",
- url="http://ftp.gnu.org/pub/gnu/readline/readline-5.1.tar.gz" ,
- patchlevel='0',
- patches=[
- # The readline maintainers don't do actual micro releases, but
- # just ship a set of patches.
- 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-001',
- 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-002',
- 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-003',
- 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-004',
- ]
- ),
-
- dict(
- name="SQLite 3.3.5",
- url="http://www.sqlite.org/sqlite-3.3.5.tar.gz",
- checksum='93f742986e8bc2dfa34792e16df017a6feccf3a2',
- configure_pre=[
- '--enable-threadsafe',
- '--enable-tempstore',
- '--enable-shared=no',
- '--enable-static=yes',
- '--disable-tcl',
- ]
- ),
-
- dict(
- name="NCurses 5.5",
- url="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.5.tar.gz",
- configure_pre=[
- "--without-cxx",
- "--without-ada",
- "--without-progs",
- "--without-curses-h",
- "--enable-shared",
- "--with-shared",
- "--datadir=/usr/share",
- "--sysconfdir=/etc",
- "--sharedstatedir=/usr/com",
- "--with-terminfo-dirs=/usr/share/terminfo",
- "--with-default-terminfo-dir=/usr/share/terminfo",
- "--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib"%(getVersion(),),
- "--enable-termcap",
- ],
- patches=[
- "ncurses-5.5.patch",
- ],
- useLDFlags=False,
- install='make && make install DESTDIR=%s && cd %s/usr/local/lib && ln -fs ../../../Library/Frameworks/Python.framework/Versions/%s/lib/lib* .'%(
- shellQuote(os.path.join(WORKDIR, 'libraries')),
- shellQuote(os.path.join(WORKDIR, 'libraries')),
- getVersion(),
- ),
- ),
- dict(
- name="Sleepycat DB 4.4",
- url="http://downloads.sleepycat.com/db-4.4.20.tar.gz",
- #name="Sleepycat DB 4.3.29",
- #url="http://downloads.sleepycat.com/db-4.3.29.tar.gz",
- buildDir="build_unix",
- configure="../dist/configure",
- configure_pre=[
- '--includedir=/usr/local/include/db4',
- ]
- ),
-]
-
-
-# Instructions for building packages inside the .mpkg.
-PKG_RECIPES=[
- dict(
- name="PythonFramework",
- long_name="Python Framework",
- source="/Library/Frameworks/Python.framework",
- readme="""\
- This package installs Python.framework, that is the python
- interpreter and the standard library. This also includes Python
- wrappers for lots of Mac OS X API's.
- """,
- postflight="scripts/postflight.framework",
- ),
- dict(
- name="PythonApplications",
- long_name="GUI Applications",
- source="/Applications/MacPython %(VER)s",
- readme="""\
- This package installs Python.framework, that is the python
- interpreter and the standard library. This also includes Python
- wrappers for lots of Mac OS X API's.
- """,
- required=False,
- ),
- dict(
- name="PythonUnixTools",
- long_name="UNIX command-line tools",
- source="/usr/local/bin",
- readme="""\
- This package installs the unix tools in /usr/local/bin for
- compatibility with older releases of MacPython. This package
- is not necessary to use MacPython.
- """,
- required=False,
- ),
- dict(
- name="PythonDocumentation",
- long_name="Python Documentation",
- topdir="/Library/Frameworks/Python.framework/Versions/%(VER)s/Resources/English.lproj/Documentation",
- source="/pydocs",
- readme="""\
- This package installs the python documentation at a location
- that is useable for pydoc and IDLE. If you have installed Xcode
- it will also install a link to the documentation in
- /Developer/Documentation/Python
- """,
- postflight="scripts/postflight.documentation",
- required=False,
- ),
- dict(
- name="PythonProfileChanges",
- long_name="Shell profile updater",
- readme="""\
- This packages updates your shell profile to make sure that
- the MacPython tools are found by your shell in preference of
- the system provided Python tools.
-
- If you don't install this package you'll have to add
- "/Library/Frameworks/Python.framework/Versions/%(VER)s/bin"
- to your PATH by hand.
- """,
- postflight="scripts/postflight.patch-profile",
- topdir="/Library/Frameworks/Python.framework",
- source="/empty-dir",
- required=False,
- ),
-]
-
-
-def fatal(msg):
- """
- A fatal error, bail out.
- """
- sys.stderr.write('FATAL: ')
- sys.stderr.write(msg)
- sys.stderr.write('\n')
- sys.exit(1)
-
-def fileContents(fn):
- """
- Return the contents of the named file
- """
- return open(fn, 'rb').read()
-
-def runCommand(commandline):
- """
- Run a command and raise RuntimeError if it fails. Output is surpressed
- unless the command fails.
- """
- fd = os.popen(commandline, 'r')
- data = fd.read()
- xit = fd.close()
- if xit != None:
- sys.stdout.write(data)
- raise RuntimeError, "command failed: %s"%(commandline,)
-
- if VERBOSE:
- sys.stdout.write(data); sys.stdout.flush()
-
-def captureCommand(commandline):
- fd = os.popen(commandline, 'r')
- data = fd.read()
- xit = fd.close()
- if xit != None:
- sys.stdout.write(data)
- raise RuntimeError, "command failed: %s"%(commandline,)
-
- return data
-
-def checkEnvironment():
- """
- Check that we're running on a supported system.
- """
-
- if platform.system() != 'Darwin':
- fatal("This script should be run on a Mac OS X 10.4 system")
-
- if platform.release() <= '8.':
- fatal("This script should be run on a Mac OS X 10.4 system")
-
- if not os.path.exists(SDKPATH):
- fatal("Please install the latest version of Xcode and the %s SDK"%(
- os.path.basename(SDKPATH[:-4])))
-
-
-
-def parseOptions(args = None):
- """
- Parse arguments and update global settings.
- """
- global WORKDIR, DEPSRC, SDKPATH, SRCDIR
-
- if args is None:
- args = sys.argv[1:]
-
- try:
- options, args = getopt.getopt(args, '?hb',
- [ 'build-dir=', 'third-party=', 'sdk-path=' , 'src-dir='])
- except getopt.error, msg:
- print msg
- sys.exit(1)
-
- if args:
- print "Additional arguments"
- sys.exit(1)
-
- for k, v in options:
- if k in ('-h', '-?'):
- print USAGE
- sys.exit(0)
-
- elif k in ('-d', '--build-dir'):
- WORKDIR=v
-
- elif k in ('--third-party',):
- DEPSRC=v
-
- elif k in ('--sdk-path',):
- SDKPATH=v
-
- elif k in ('--src-dir',):
- SRCDIR=v
-
- else:
- raise NotImplementedError, k
-
- SRCDIR=os.path.abspath(SRCDIR)
- WORKDIR=os.path.abspath(WORKDIR)
- SDKPATH=os.path.abspath(SDKPATH)
- DEPSRC=os.path.abspath(DEPSRC)
-
- print "Settings:"
- print " * Source directory:", SRCDIR
- print " * Build directory: ", WORKDIR
- print " * SDK location: ", SDKPATH
- print " * third-party source:", DEPSRC
- print ""
-
-
-
-
-def extractArchive(builddir, archiveName):
- """
- Extract a source archive into 'builddir'. Returns the path of the
- extracted archive.
-
- XXX: This function assumes that archives contain a toplevel directory
- that is has the same name as the basename of the archive. This is
- save enough for anything we use.
- """
- curdir = os.getcwd()
- try:
- os.chdir(builddir)
- if archiveName.endswith('.tar.gz'):
- retval = os.path.basename(archiveName[:-7])
- if os.path.exists(retval):
- shutil.rmtree(retval)
- fp = os.popen("tar zxf %s 2>&1"%(shellQuote(archiveName),), 'r')
-
- elif archiveName.endswith('.tar.bz2'):
- retval = os.path.basename(archiveName[:-8])
- if os.path.exists(retval):
- shutil.rmtree(retval)
- fp = os.popen("tar jxf %s 2>&1"%(shellQuote(archiveName),), 'r')
-
- elif archiveName.endswith('.tar'):
- retval = os.path.basename(archiveName[:-4])
- if os.path.exists(retval):
- shutil.rmtree(retval)
- fp = os.popen("tar xf %s 2>&1"%(shellQuote(archiveName),), 'r')
-
- elif archiveName.endswith('.zip'):
- retval = os.path.basename(archiveName[:-4])
- if os.path.exists(retval):
- shutil.rmtree(retval)
- fp = os.popen("unzip %s 2>&1"%(shellQuote(archiveName),), 'r')
-
- data = fp.read()
- xit = fp.close()
- if xit is not None:
- sys.stdout.write(data)
- raise RuntimeError, "Cannot extract %s"%(archiveName,)
-
- return os.path.join(builddir, retval)
-
- finally:
- os.chdir(curdir)
-
-KNOWNSIZES = {
- "http://ftp.gnu.org/pub/gnu/readline/readline-5.1.tar.gz": 7952742,
- "http://downloads.sleepycat.com/db-4.4.20.tar.gz": 2030276,
-}
-
-def downloadURL(url, fname):
- """
- Download the contents of the url into the file.
- """
- try:
- size = os.path.getsize(fname)
- except OSError:
- pass
- else:
- if KNOWNSIZES.get(url) == size:
- print "Using existing file for", url
- return
- fpIn = urllib2.urlopen(url)
- fpOut = open(fname, 'wb')
- block = fpIn.read(10240)
- try:
- while block:
- fpOut.write(block)
- block = fpIn.read(10240)
- fpIn.close()
- fpOut.close()
- except:
- try:
- os.unlink(fname)
- except:
- pass
-
-def buildRecipe(recipe, basedir, archList):
- """
- Build software using a recipe. This function does the
- 'configure;make;make install' dance for C software, with a possibility
- to customize this process, basically a poor-mans DarwinPorts.
- """
- curdir = os.getcwd()
-
- name = recipe['name']
- url = recipe['url']
- configure = recipe.get('configure', './configure')
- install = recipe.get('install', 'make && make install DESTDIR=%s'%(
- shellQuote(basedir)))
-
- archiveName = os.path.split(url)[-1]
- sourceArchive = os.path.join(DEPSRC, archiveName)
-
- if not os.path.exists(DEPSRC):
- os.mkdir(DEPSRC)
-
-
- if os.path.exists(sourceArchive):
- print "Using local copy of %s"%(name,)
-
- else:
- print "Downloading %s"%(name,)
- downloadURL(url, sourceArchive)
- print "Archive for %s stored as %s"%(name, sourceArchive)
-
- print "Extracting archive for %s"%(name,)
- buildDir=os.path.join(WORKDIR, '_bld')
- if not os.path.exists(buildDir):
- os.mkdir(buildDir)
-
- workDir = extractArchive(buildDir, sourceArchive)
- os.chdir(workDir)
- if 'buildDir' in recipe:
- os.chdir(recipe['buildDir'])
-
-
- for fn in recipe.get('patches', ()):
- if fn.startswith('http://'):
- # Download the patch before applying it.
- path = os.path.join(DEPSRC, os.path.basename(fn))
- downloadURL(fn, path)
- fn = path
-
- fn = os.path.join(curdir, fn)
- runCommand('patch -p%s < %s'%(recipe.get('patchlevel', 1),
- shellQuote(fn),))
-
- configure_args = [
- "--prefix=/usr/local",
- "--enable-static",
- "--disable-shared",
- #"CPP=gcc -arch %s -E"%(' -arch '.join(archList,),),
- ]
-
- if 'configure_pre' in recipe:
- args = list(recipe['configure_pre'])
- if '--disable-static' in args:
- configure_args.remove('--enable-static')
- if '--enable-shared' in args:
- configure_args.remove('--disable-shared')
- configure_args.extend(args)
-
- if recipe.get('useLDFlags', 1):
- configure_args.extend([
- "CFLAGS=-arch %s -isysroot %s -I%s/usr/local/include"%(
- ' -arch '.join(archList),
- shellQuote(SDKPATH)[1:-1],
- shellQuote(basedir)[1:-1],),
- "LDFLAGS=-syslibroot,%s -L%s/usr/local/lib -arch %s"%(
- shellQuote(SDKPATH)[1:-1],
- shellQuote(basedir)[1:-1],
- ' -arch '.join(archList)),
- ])
- else:
- configure_args.extend([
- "CFLAGS=-arch %s -isysroot %s -I%s/usr/local/include"%(
- ' -arch '.join(archList),
- shellQuote(SDKPATH)[1:-1],
- shellQuote(basedir)[1:-1],),
- ])
-
- if 'configure_post' in recipe:
- configure_args = configure_args = list(recipe['configure_post'])
-
- configure_args.insert(0, configure)
- configure_args = [ shellQuote(a) for a in configure_args ]
-
- print "Running configure for %s"%(name,)
- runCommand(' '.join(configure_args) + ' 2>&1')
-
- print "Running install for %s"%(name,)
- runCommand('{ ' + install + ' ;} 2>&1')
-
- print "Done %s"%(name,)
- print ""
-
- os.chdir(curdir)
-
-def buildLibraries():
- """
- Build our dependencies into $WORKDIR/libraries/usr/local
- """
- print ""
- print "Building required libraries"
- print ""
- universal = os.path.join(WORKDIR, 'libraries')
- os.mkdir(universal)
- os.makedirs(os.path.join(universal, 'usr', 'local', 'lib'))
- os.makedirs(os.path.join(universal, 'usr', 'local', 'include'))
-
- for recipe in LIBRARY_RECIPES:
- buildRecipe(recipe, universal, ('i386', 'ppc',))
-
-
-
-def buildPythonDocs():
- # This stores the documentation as Resources/English.lproj/Docuentation
- # inside the framwork. pydoc and IDLE will pick it up there.
- print "Install python documentation"
- rootDir = os.path.join(WORKDIR, '_root')
- version = getVersion()
- docdir = os.path.join(rootDir, 'pydocs')
-
- name = 'html-%s.tar.bz2'%(getFullVersion(),)
- sourceArchive = os.path.join(DEPSRC, name)
- if os.path.exists(sourceArchive):
- print "Using local copy of %s"%(name,)
-
- else:
- print "Downloading %s"%(name,)
- downloadURL('http://www.python.org/ftp/python/doc/%s/%s'%(
- getFullVersion(), name), sourceArchive)
- print "Archive for %s stored as %s"%(name, sourceArchive)
-
- extractArchive(os.path.dirname(docdir), sourceArchive)
- os.rename(
- os.path.join(
- os.path.dirname(docdir), 'Python-Docs-%s'%(getFullVersion(),)),
- docdir)
-
-
-def buildPython():
- print "Building a universal python"
-
- buildDir = os.path.join(WORKDIR, '_bld', 'python')
- rootDir = os.path.join(WORKDIR, '_root')
-
- if os.path.exists(buildDir):
- shutil.rmtree(buildDir)
- if os.path.exists(rootDir):
- shutil.rmtree(rootDir)
- os.mkdir(buildDir)
- os.mkdir(rootDir)
- os.mkdir(os.path.join(rootDir, 'empty-dir'))
- curdir = os.getcwd()
- os.chdir(buildDir)
-
- # Not sure if this is still needed, the original build script
- # claims that parts of the install assume python.exe exists.
- os.symlink('python', os.path.join(buildDir, 'python.exe'))
-
- # Extract the version from the configure file, needed to calculate
- # several paths.
- version = getVersion()
-
- print "Running configure..."
- runCommand("%s -C --enable-framework --enable-universalsdk=%s LDFLAGS='-g -L%s/libraries/usr/local/lib' OPT='-g -O3 -I%s/libraries/usr/local/include' 2>&1"%(
- shellQuote(os.path.join(SRCDIR, 'configure')),
- shellQuote(SDKPATH), shellQuote(WORKDIR)[1:-1],
- shellQuote(WORKDIR)[1:-1]))
-
- print "Running make"
- runCommand("make")
-
- print "Runing make frameworkinstall"
- runCommand("make frameworkinstall DESTDIR=%s"%(
- shellQuote(rootDir)))
-
- print "Runing make frameworkinstallextras"
- runCommand("make frameworkinstallextras DESTDIR=%s"%(
- shellQuote(rootDir)))
-
- print "Copy required shared libraries"
- if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')):
- runCommand("mv %s/* %s"%(
- shellQuote(os.path.join(
- WORKDIR, 'libraries', 'Library', 'Frameworks',
- 'Python.framework', 'Versions', getVersion(),
- 'lib')),
- shellQuote(os.path.join(WORKDIR, '_root', 'Library', 'Frameworks',
- 'Python.framework', 'Versions', getVersion(),
- 'lib'))))
-
- print "Fix file modes"
- frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework')
- for dirpath, dirnames, filenames in os.walk(frmDir):
- for dn in dirnames:
- os.chmod(os.path.join(dirpath, dn), 0775)
-
- for fn in filenames:
- if os.path.islink(fn):
- continue
-
- # "chmod g+w $fn"
- p = os.path.join(dirpath, fn)
- st = os.stat(p)
- os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IXGRP)
-
- # We added some directories to the search path during the configure
- # phase. Remove those because those directories won't be there on
- # the end-users system.
- path =os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework',
- 'Versions', version, 'lib', 'python%s'%(version,),
- 'config', 'Makefile')
- fp = open(path, 'r')
- data = fp.read()
- fp.close()
-
- data = data.replace('-L%s/libraries/usr/local/lib'%(WORKDIR,), '')
- data = data.replace('-I%s/libraries/usr/local/include'%(WORKDIR,), '')
- fp = open(path, 'w')
- fp.write(data)
- fp.close()
-
- # Add symlinks in /usr/local/bin, using relative links
- usr_local_bin = os.path.join(rootDir, 'usr', 'local', 'bin')
- to_framework = os.path.join('..', '..', '..', 'Library', 'Frameworks',
- 'Python.framework', 'Versions', version, 'bin')
- if os.path.exists(usr_local_bin):
- shutil.rmtree(usr_local_bin)
- os.makedirs(usr_local_bin)
- for fn in os.listdir(
- os.path.join(frmDir, 'Versions', version, 'bin')):
- os.symlink(os.path.join(to_framework, fn),
- os.path.join(usr_local_bin, fn))
-
- os.chdir(curdir)
-
-
-
-def patchFile(inPath, outPath):
- data = fileContents(inPath)
- data = data.replace('$FULL_VERSION', getFullVersion())
- data = data.replace('$VERSION', getVersion())
- data = data.replace('$MACOSX_DEPLOYMENT_TARGET', '10.3 or later')
- data = data.replace('$ARCHITECTURES', "i386, ppc")
- data = data.replace('$INSTALL_SIZE', installSize())
- fp = open(outPath, 'wb')
- fp.write(data)
- fp.close()
-
-def patchScript(inPath, outPath):
- data = fileContents(inPath)
- data = data.replace('@PYVER@', getVersion())
- fp = open(outPath, 'wb')
- fp.write(data)
- fp.close()
- os.chmod(outPath, 0755)
-
-
-
-def packageFromRecipe(targetDir, recipe):
- curdir = os.getcwd()
- try:
- pkgname = recipe['name']
- srcdir = recipe.get('source')
- pkgroot = recipe.get('topdir', srcdir)
- postflight = recipe.get('postflight')
- readme = textwrap.dedent(recipe['readme'])
- isRequired = recipe.get('required', True)
-
- print "- building package %s"%(pkgname,)
-
- # Substitute some variables
- textvars = dict(
- VER=getVersion(),
- FULLVER=getFullVersion(),
- )
- readme = readme % textvars
-
- if pkgroot is not None:
- pkgroot = pkgroot % textvars
- else:
- pkgroot = '/'
-
- if srcdir is not None:
- srcdir = os.path.join(WORKDIR, '_root', srcdir[1:])
- srcdir = srcdir % textvars
-
- if postflight is not None:
- postflight = os.path.abspath(postflight)
-
- packageContents = os.path.join(targetDir, pkgname + '.pkg', 'Contents')
- os.makedirs(packageContents)
-
- if srcdir is not None:
- os.chdir(srcdir)
- runCommand("pax -wf %s . 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
- runCommand("gzip -9 %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),))
- runCommand("mkbom . %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.bom')),))
-
- fn = os.path.join(packageContents, 'PkgInfo')
- fp = open(fn, 'w')
- fp.write('pmkrpkg1')
- fp.close()
-
- rsrcDir = os.path.join(packageContents, "Resources")
- os.mkdir(rsrcDir)
- fp = open(os.path.join(rsrcDir, 'ReadMe.txt'), 'w')
- fp.write(readme)
- fp.close()
-
- if postflight is not None:
- patchScript(postflight, os.path.join(rsrcDir, 'postflight'))
-
- vers = getFullVersion()
- major, minor = map(int, getVersion().split('.', 2))
- pl = Plist(
- CFBundleGetInfoString="MacPython.%s %s"%(pkgname, vers,),
- CFBundleIdentifier='org.python.MacPython.%s'%(pkgname,),
- CFBundleName='MacPython.%s'%(pkgname,),
- CFBundleShortVersionString=vers,
- IFMajorVersion=major,
- IFMinorVersion=minor,
- IFPkgFormatVersion=0.10000000149011612,
- IFPkgFlagAllowBackRev=False,
- IFPkgFlagAuthorizationAction="RootAuthorization",
- IFPkgFlagDefaultLocation=pkgroot,
- IFPkgFlagFollowLinks=True,
- IFPkgFlagInstallFat=True,
- IFPkgFlagIsRequired=isRequired,
- IFPkgFlagOverwritePermissions=False,
- IFPkgFlagRelocatable=False,
- IFPkgFlagRestartAction="NoRestart",
- IFPkgFlagRootVolumeOnly=True,
- IFPkgFlagUpdateInstalledLangauges=False,
- )
- writePlist(pl, os.path.join(packageContents, 'Info.plist'))
-
- pl = Plist(
- IFPkgDescriptionDescription=readme,
- IFPkgDescriptionTitle=recipe.get('long_name', "MacPython.%s"%(pkgname,)),
- IFPkgDescriptionVersion=vers,
- )
- writePlist(pl, os.path.join(packageContents, 'Resources', 'Description.plist'))
-
- finally:
- os.chdir(curdir)
-
-
-def makeMpkgPlist(path):
-
- vers = getFullVersion()
- major, minor = map(int, getVersion().split('.', 2))
-
- pl = Plist(
- CFBundleGetInfoString="MacPython %s"%(vers,),
- CFBundleIdentifier='org.python.MacPython',
- CFBundleName='MacPython',
- CFBundleShortVersionString=vers,
- IFMajorVersion=major,
- IFMinorVersion=minor,
- IFPkgFlagComponentDirectory="Contents/Packages",
- IFPkgFlagPackageList=[
- dict(
- IFPkgFlagPackageLocation='%s.pkg'%(item['name']),
- IFPkgFlagPackageSelection='selected'
- )
- for item in PKG_RECIPES
- ],
- IFPkgFormatVersion=0.10000000149011612,
- IFPkgFlagBackgroundScaling="proportional",
- IFPkgFlagBackgroundAlignment="left",
- )
-
- writePlist(pl, path)
-
-
-def buildInstaller():
-
- # Zap all compiled files
- for dirpath, _, filenames in os.walk(os.path.join(WORKDIR, '_root')):
- for fn in filenames:
- if fn.endswith('.pyc') or fn.endswith('.pyo'):
- os.unlink(os.path.join(dirpath, fn))
-
- outdir = os.path.join(WORKDIR, 'installer')
- if os.path.exists(outdir):
- shutil.rmtree(outdir)
- os.mkdir(outdir)
-
- pkgroot = os.path.join(outdir, 'MacPython.mpkg', 'Contents')
- pkgcontents = os.path.join(pkgroot, 'Packages')
- os.makedirs(pkgcontents)
- for recipe in PKG_RECIPES:
- packageFromRecipe(pkgcontents, recipe)
-
- rsrcDir = os.path.join(pkgroot, 'Resources')
-
- fn = os.path.join(pkgroot, 'PkgInfo')
- fp = open(fn, 'w')
- fp.write('pmkrpkg1')
- fp.close()
-
- os.mkdir(rsrcDir)
-
- makeMpkgPlist(os.path.join(pkgroot, 'Info.plist'))
- pl = Plist(
- IFPkgDescriptionTitle="Universal MacPython",
- IFPkgDescriptionVersion=getVersion(),
- )
-
- writePlist(pl, os.path.join(pkgroot, 'Resources', 'Description.plist'))
- for fn in os.listdir('resources'):
- if fn == '.svn': continue
- if fn.endswith('.jpg'):
- shutil.copy(os.path.join('resources', fn), os.path.join(rsrcDir, fn))
- else:
- patchFile(os.path.join('resources', fn), os.path.join(rsrcDir, fn))
-
- shutil.copy("../../../LICENSE", os.path.join(rsrcDir, 'License.txt'))
-
-
-def installSize(clear=False, _saved=[]):
- if clear:
- del _saved[:]
- if not _saved:
- data = captureCommand("du -ks %s"%(
- shellQuote(os.path.join(WORKDIR, '_root'))))
- _saved.append("%d"%((0.5 + (int(data.split()[0]) / 1024.0)),))
- return _saved[0]
-
-
-def buildDMG():
- """
- Create DMG containing the rootDir
- """
- outdir = os.path.join(WORKDIR, 'diskimage')
- if os.path.exists(outdir):
- shutil.rmtree(outdir)
-
- imagepath = os.path.join(outdir,
- 'python-%s-macosx'%(getFullVersion(),))
- if INCLUDE_TIMESTAMP:
- imagepath = imagepath + '%04d-%02d-%02d'%(time.localtime()[:3])
- imagepath = imagepath + '.dmg'
-
- os.mkdir(outdir)
- runCommand("hdiutil create -volname 'Univeral MacPython %s' -srcfolder %s %s"%(
- getFullVersion(),
- shellQuote(os.path.join(WORKDIR, 'installer')),
- shellQuote(imagepath)))
-
- return imagepath
-
-
-def setIcon(filePath, icnsPath):
- """
- Set the custom icon for the specified file or directory.
-
- For a directory the icon data is written in a file named 'Icon\r' inside
- the directory. For both files and directories write the icon as an 'icns'
- resource. Furthermore set kHasCustomIcon in the finder flags for filePath.
- """
- ref, isDirectory = Carbon.File.FSPathMakeRef(icnsPath)
- icon = Carbon.Icn.ReadIconFile(ref)
- del ref
-
- #
- # Open the resource fork of the target, to add the icon later on.
- # For directories we use the file 'Icon\r' inside the directory.
- #
-
- ref, isDirectory = Carbon.File.FSPathMakeRef(filePath)
-
- if isDirectory:
- tmpPath = os.path.join(filePath, "Icon\r")
- if not os.path.exists(tmpPath):
- fp = open(tmpPath, 'w')
- fp.close()
-
- tmpRef, _ = Carbon.File.FSPathMakeRef(tmpPath)
- spec = Carbon.File.FSSpec(tmpRef)
-
- else:
- spec = Carbon.File.FSSpec(ref)
-
- try:
- Carbon.Res.HCreateResFile(*spec.as_tuple())
- except MacOS.Error:
- pass
-
- # Try to create the resource fork again, this will avoid problems
- # when adding an icon to a directory. I have no idea why this helps,
- # but without this adding the icon to a directory will fail sometimes.
- try:
- Carbon.Res.HCreateResFile(*spec.as_tuple())
- except MacOS.Error:
- pass
-
- refNum = Carbon.Res.FSpOpenResFile(spec, fsRdWrPerm)
-
- Carbon.Res.UseResFile(refNum)
-
- # Check if there already is an icon, remove it if there is.
- try:
- h = Carbon.Res.Get1Resource('icns', kCustomIconResource)
- except MacOS.Error:
- pass
-
- else:
- h.RemoveResource()
- del h
-
- # Add the icon to the resource for of the target
- res = Carbon.Res.Resource(icon)
- res.AddResource('icns', kCustomIconResource, '')
- res.WriteResource()
- res.DetachResource()
- Carbon.Res.CloseResFile(refNum)
-
- # And now set the kHasCustomIcon property for the target. Annoyingly,
- # python doesn't seem to have bindings for the API that is needed for
- # this. Cop out and call SetFile
- os.system("/Developer/Tools/SetFile -a C %s"%(
- shellQuote(filePath),))
-
- if isDirectory:
- os.system('/Developer/Tools/SetFile -a V %s'%(
- shellQuote(tmpPath),
- ))
-
-def main():
- # First parse options and check if we can perform our work
- parseOptions()
- checkEnvironment()
-
- os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3'
-
- if os.path.exists(WORKDIR):
- shutil.rmtree(WORKDIR)
- os.mkdir(WORKDIR)
-
- # Then build third-party libraries such as sleepycat DB4.
- buildLibraries()
-
- # Now build python itself
- buildPython()
- buildPythonDocs()
- fn = os.path.join(WORKDIR, "_root", "Applications",
- "MacPython %s"%(getVersion(),), "Update Shell Profile.command")
- shutil.copy("scripts/postflight.patch-profile", fn)
- os.chmod(fn, 0755)
-
- folder = os.path.join(WORKDIR, "_root", "Applications", "MacPython %s"%(
- getVersion(),))
- os.chmod(folder, 0755)
- setIcon(folder, "../Icons/Python Folder.icns")
-
- # Create the installer
- buildInstaller()
-
- # And copy the readme into the directory containing the installer
- patchFile('resources/ReadMe.txt', os.path.join(WORKDIR, 'installer', 'ReadMe.txt'))
-
- # Ditto for the license file.
- shutil.copy('../../../LICENSE', os.path.join(WORKDIR, 'installer', 'License.txt'))
-
- fp = open(os.path.join(WORKDIR, 'installer', 'Build.txt'), 'w')
- print >> fp, "# BUILD INFO"
- print >> fp, "# Date:", time.ctime()
- print >> fp, "# By:", pwd.getpwuid(os.getuid()).pw_gecos
- fp.close()
-
- # Custom icon for the DMG, shown when the DMG is mounted.
- shutil.copy("../Icons/Disk Image.icns",
- os.path.join(WORKDIR, "installer", ".VolumeIcon.icns"))
- os.system("/Developer/Tools/SetFile -a C %s"%(
- os.path.join(WORKDIR, "installer", ".VolumeIcon.icns")))
-
-
- # And copy it to a DMG
- buildDMG()
-
-
-if __name__ == "__main__":
- main()
diff --git a/Mac/OSX/BuildScript/ncurses-5.5.patch b/Mac/OSX/BuildScript/ncurses-5.5.patch
deleted file mode 100644
index 0eab3d3..0000000
--- a/Mac/OSX/BuildScript/ncurses-5.5.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -r -u ncurses-5.5-orig/test/Makefile.in ncurses-5.5/test/Makefile.in
---- ncurses-5.5-orig/test/Makefile.in 2006-03-24 12:47:40.000000000 +0100
-+++ ncurses-5.5/test/Makefile.in 2006-03-24 12:47:50.000000000 +0100
-@@ -75,7 +75,7 @@
- MATH_LIB = @MATH_LIB@
-
- LD = @LD@
--LINK = @LINK_TESTS@ $(LIBTOOL_LINK) $(CC) $(CFLAGS)
-+LINK = @LINK_TESTS@ $(LIBTOOL_LINK) $(CC)
-
- usFLAGS = @LD_MODEL@ @LOCAL_LDFLAGS@ @LDFLAGS@
-
-diff -ru ncurses-5.5-orig/ncurses/tinfo/read_entry.c ncurses-5.5/ncurses/tinfo/read_entry.c
---- ncurses-5.5-orig/ncurses/tinfo/read_entry.c 2004-01-11 02:57:05.000000000 +0100
-+++ ncurses-5.5/ncurses/tinfo/read_entry.c 2006-03-25 22:49:39.000000000 +0100
-@@ -474,7 +474,7 @@
- }
-
- /* truncate the terminal name to prevent buffer overflow */
-- (void) sprintf(ttn, "%c/%.*s", *tn, (int) sizeof(ttn) - 3, tn);
-+ (void) sprintf(ttn, "%x/%.*s", *tn, (int) sizeof(ttn) - 3, tn);
-
- /* This is System V behavior, in conjunction with our requirements for
- * writing terminfo entries.
-diff -ru ncurses-5.5-orig/configure ncurses-5.5/configure
---- ncurses-5.5-orig/configure 2005-09-24 23:50:50.000000000 +0200
-+++ ncurses-5.5/configure 2006-03-26 22:24:59.000000000 +0200
-@@ -5027,7 +5027,7 @@
- darwin*)
- EXTRA_CFLAGS="-no-cpp-precomp"
- CC_SHARED_OPTS="-dynamic"
-- MK_SHARED_LIB='$(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $@` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $@'
-+ MK_SHARED_LIB='$(CC) $(CFLAGS) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $@` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $@'
- test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
- cf_cv_shlib_version_infix=yes
- ;;
diff --git a/Mac/OSX/BuildScript/resources/ReadMe.txt b/Mac/OSX/BuildScript/resources/ReadMe.txt
deleted file mode 100644
index 1a6e637..0000000
--- a/Mac/OSX/BuildScript/resources/ReadMe.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-This package will install MacPython $FULL_VERSION for Mac OS X
-$MACOSX_DEPLOYMENT_TARGET for the following
-architecture(s): $ARCHITECTURES.
-
-Separate installers are available for older versions
-of Mac OS X, see the homepage, below.
-
-Installation requires approximately $INSTALL_SIZE MB of disk
-space, ignore the message that it will take zero bytes.
-
-You must install onto your current boot disk, even
-though the installer does not enforce this, otherwise
-things will not work.
-
-MacPython consists of the Python programming language
-interpreter, plus a set of programs to allow easy
-access to it for Mac users (an integrated development
-environment, an applet builder), plus a set of pre-built
-extension modules that open up specific Macintosh technologies
-to Python programs (Carbon, AppleScript, Quicktime, more).
-
-The installer puts the applications in "MacPython $VERSION"
-in your Applications folder, command-line tools in
-/usr/local/bin and the underlying machinery in
-$PYTHONFRAMEWORKINSTALLDIR.
-
-More information on MacPython can be found at
-http://www.cwi.nl/~jack/macpython and
-http://pythonmac.org/. More information on
-Python in general can be found at
-http://www.python.org.
diff --git a/Mac/OSX/BuildScript/resources/Welcome.rtf b/Mac/OSX/BuildScript/resources/Welcome.rtf
deleted file mode 100644
index cb65f09..0000000
--- a/Mac/OSX/BuildScript/resources/Welcome.rtf
+++ /dev/null
@@ -1,15 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf330
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;}
-{\colortbl;\red255\green255\blue255;}
-\paperw11900\paperh16840\margl1440\margr1440\vieww9920\viewh10660\viewkind0
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
-
-\f0\fs24 \cf0 This package will install
-\f1\b MacPython $FULL_VERSION
-\f0\b0 for
-\f1\b Mac OS X $MACOSX_DEPLOYMENT_TARGET
-\f0\b0 .\
-\
-MacPython consists of the Python programming language interpreter, plus a set of programs to allow easy access to it for Mac users (an integrated development environment, an applet builder), plus a set of pre-built extension modules that open up specific Macintosh technologies to Python programs (Carbon, AppleScript, Quicktime, more).\
-\
-See the ReadMe file for more information.} \ No newline at end of file
diff --git a/Mac/OSX/BuildScript/resources/background.jpg b/Mac/OSX/BuildScript/resources/background.jpg
deleted file mode 100644
index b3c7640..0000000
--- a/Mac/OSX/BuildScript/resources/background.jpg
+++ /dev/null
Binary files differ
diff --git a/Mac/OSX/BuildScript/scripts/postflight.documentation b/Mac/OSX/BuildScript/scripts/postflight.documentation
deleted file mode 100755
index 85d400f..0000000
--- a/Mac/OSX/BuildScript/scripts/postflight.documentation
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# FIXME
-PYVER="@PYVER@"
-
-if [ -d /Developer/Documentation ]; then
- if [ ! -d /Developer/Documentation/Python ]; then
- mkdir -p /Developer/Documentation/Python
- fi
-
- ln -fhs /Library/Frameworks/Python.framework/Versions/${PYVER}/Resources/English.lproj/Documentation "/Developer/Documentation/Python/Reference Documentation"
-fi
diff --git a/Mac/OSX/BuildScript/scripts/postflight.framework b/Mac/OSX/BuildScript/scripts/postflight.framework
deleted file mode 100755
index 532e745..0000000
--- a/Mac/OSX/BuildScript/scripts/postflight.framework
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-#
-# Recompile the .py files.
-#
-
-PYVER="@PYVER@"
-FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@/"
-
-"${FWK}/bin/python" -Wi -tt \
- "${FWK}/lib/python${PYVER}/compileall.py" \
- -x badsyntax -x site-packages \
- "${FWK}/lib/python${PYVER}"
-
-"${FWK}/bin/python" -Wi -tt -O \
- "${FWK}/lib/python${PYVER}/compileall.py" \
- -x badsyntax -x site-packages \
- "${FWK}/lib/python${PYVER}"
-
-"${FWK}/bin/python" -Wi -tt \
- "${FWK}/lib/python${PYVER}/compileall.py" \
- -x badsyntax -x site-packages \
- "${FWK}/Mac/Tools"
-
-"${FWK}/bin/python" -Wi -tt -O \
- "${FWK}/lib/python${PYVER}/compileall.py" \
- -x badsyntax -x site-packages \
- "${FWK}/Mac/Tools"
-
-
-chown -R admin "${FWK}"
-chmod -R g+w "${FWK}"
-
-exit 0
diff --git a/Mac/OSX/BuildScript/scripts/postflight.patch-profile b/Mac/OSX/BuildScript/scripts/postflight.patch-profile
deleted file mode 100755
index 48bf701..0000000
--- a/Mac/OSX/BuildScript/scripts/postflight.patch-profile
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-
-echo "This script will update your shell profile when the 'bin' directory"
-echo "of python is not early enough of the PATH of your shell."
-echo "These changes will be effective only in shell windows that you open"
-echo "after running this script."
-
-PYVER=@PYVER@
-PYTHON_ROOT="/Library/Frameworks/Python.framework/Versions/Current"
-
-# Make sure the directory ${PYTHON_ROOT}/bin is on the users PATH.
-BSH="`basename "${SHELL}"`"
-case "${BSH}" in
-bash|ksh|sh|*csh)
- P="`${SHELL} -c 'echo $PATH'`"
- ;;
-*)
- echo "Sorry, I don't know how to patch $BSH shells"
- exit 0
- ;;
-esac
-
-# Now ensure that our bin directory is on $P and before /usr/bin at that
-for elem in `echo $P | tr ':' ' '`
-do
- if [ "${elem}" == "${PYTHON_ROOT}/bin" ]; then
- echo "All right, you're a python lover already"
- exit 0
- elif [ "${elem}" == "/usr/bin" ]; then
- break
- fi
-done
-
-echo "${PYTHON_ROOT}/bin is not on your PATH or at least not early enough"
-case "${BSH}" in
-*csh)
- # Create backup copy before patching
- if [ -f "${HOME}/.cshrc" ]; then
- cp -fp "${HOME}/.cshrc" "${HOME}/.cshrc.pysave"
- fi
- echo "" >> "${HOME}/.cshrc"
- echo "# Setting PATH for MacPython ${PYVER}" >> "${HOME}/.cshrc"
- echo "# The orginal version is saved in .cshrc.pysave" >> "${HOME}/.cshrc"
- echo "set path=(${PYTHON_ROOT}/bin "'$path'")" >> "${HOME}/.cshrc"
- exit 0
- ;;
-bash)
- if [ -e "${HOME}/.profile" ]; then
- PR="${HOME}/.profile"
- else
- PR="${HOME}/.bash_profile"
- fi
- ;;
-*sh)
- PR="${HOME}/.profile"
- ;;
-esac
-
-# Create backup copy before patching
-if [ -f "${PR}" ]; then
- cp -fp "${PR}" "${PR}.pysave"
-fi
-echo "" >> "${PR}"
-echo "# Setting PATH for MacPython ${PYVER}" >> "${PR}"
-echo "# The orginal version is saved in `basename ${PR}`.pysave" >> "${PR}"
-echo 'PATH="'"${PYTHON_ROOT}/bin"':${PATH}"' >> "${PR}"
-echo 'export PATH' >> "${PR}"
-if [ `id -ur` = 0 ]; then
- chown "${LOGNAME}" "${PR}"
-fi
-exit 0
diff --git a/Mac/OSX/Doc/HelpIndexingTool/Help_Indexing_Tool_Suite.py b/Mac/OSX/Doc/HelpIndexingTool/Help_Indexing_Tool_Suite.py
deleted file mode 100644
index 58d7307..0000000
--- a/Mac/OSX/Doc/HelpIndexingTool/Help_Indexing_Tool_Suite.py
+++ /dev/null
@@ -1,110 +0,0 @@
-"""Suite Help Indexing Tool Suite: Special events that just the Help Indexing Tool supports.
-Level 0, version 0
-
-Generated from /Developer/Applications/Apple Help Indexing Tool.app
-AETE/AEUT resource version 1/1, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'HIT '
-
-class Help_Indexing_Tool_Suite_Events:
-
- def turn_anchor_indexing(self, _object, _attributes={}, **_arguments):
- """turn anchor indexing: Turns anchor indexing on or off.
- Required argument: \xd2on\xd3 or \xd2off\xd3, to turn anchor indexing on or off
- Keyword argument _attributes: AppleEvent attribute dictionary
- """
- _code = 'HIT '
- _subcode = 'tAnc'
-
- if _arguments: raise TypeError, 'No optional args expected'
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
- _argmap_turn_remote_root = {
- 'with_root_url' : 'rURL',
- }
-
- def turn_remote_root(self, _object, _attributes={}, **_arguments):
- """turn remote root: Turn usage of remote root for content on the web on or off. If turning \xd2on\xd3, supply a string as second parameter.
- Required argument: \xd2on\xd3 or \xd2off\xd3, to turn remote root on or off
- Keyword argument with_root_url: The remote root to use, in the form of \xd2http://www.apple.com/help/\xd3.
- Keyword argument _attributes: AppleEvent attribute dictionary
- """
- _code = 'HIT '
- _subcode = 'tRem'
-
- aetools.keysubst(_arguments, self._argmap_turn_remote_root)
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
- def use_tokenizer(self, _object, _attributes={}, **_arguments):
- """use tokenizer: Tells the indexing tool which tokenizer to use.
- Required argument: Specify \xd2English\xd3, \xd2European\xd3, \xd2Japanese\xd3, \xd2Korean\xd3, or \xd2Simple\xd3.
- Keyword argument _attributes: AppleEvent attribute dictionary
- """
- _code = 'HIT '
- _subcode = 'uTok'
-
- if _arguments: raise TypeError, 'No optional args expected'
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
-
-class application(aetools.ComponentItem):
- """application - Application class """
- want = 'capp'
-class _Prop_idleStatus(aetools.NProperty):
- """idleStatus - """
- which = 'sIdl'
- want = 'bool'
-application._superclassnames = []
-application._privpropdict = {
- 'idleStatus' : _Prop_idleStatus,
-}
-application._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
- 'capp' : application,
-}
-
-_propdeclarations = {
- 'sIdl' : _Prop_idleStatus,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Mac/OSX/Doc/HelpIndexingTool/Miscellaneous_Standards.py b/Mac/OSX/Doc/HelpIndexingTool/Miscellaneous_Standards.py
deleted file mode 100644
index 3cf745f..0000000
--- a/Mac/OSX/Doc/HelpIndexingTool/Miscellaneous_Standards.py
+++ /dev/null
@@ -1,49 +0,0 @@
-"""Suite Miscellaneous Standards: Useful events that aren\xd5t in any other suite
-Level 0, version 0
-
-Generated from /Developer/Applications/Apple Help Indexing Tool.app
-AETE/AEUT resource version 1/1, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'misc'
-
-class Miscellaneous_Standards_Events:
-
- def revert(self, _object, _attributes={}, **_arguments):
- """revert: Revert an object to the most recently saved version
- Required argument: object to revert
- Keyword argument _attributes: AppleEvent attribute dictionary
- """
- _code = 'misc'
- _subcode = 'rvrt'
-
- if _arguments: raise TypeError, 'No optional args expected'
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Mac/OSX/Doc/HelpIndexingTool/Required_Suite.py b/Mac/OSX/Doc/HelpIndexingTool/Required_Suite.py
deleted file mode 100644
index eb9fee0..0000000
--- a/Mac/OSX/Doc/HelpIndexingTool/Required_Suite.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""Suite Required Suite: Terms that every application should support
-Level 1, version 1
-
-Generated from /Developer/Applications/Apple Help Indexing Tool.app
-AETE/AEUT resource version 1/1, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'reqd'
-
-from StdSuites.Required_Suite import *
-class Required_Suite_Events(Required_Suite_Events):
-
- pass
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Mac/OSX/Doc/HelpIndexingTool/Standard_Suite.py b/Mac/OSX/Doc/HelpIndexingTool/Standard_Suite.py
deleted file mode 100644
index 4f6604c..0000000
--- a/Mac/OSX/Doc/HelpIndexingTool/Standard_Suite.py
+++ /dev/null
@@ -1,343 +0,0 @@
-"""Suite Standard Suite: Common terms for most applications
-Level 1, version 1
-
-Generated from /Developer/Applications/Apple Help Indexing Tool.app
-AETE/AEUT resource version 1/1, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'CoRe'
-
-from StdSuites.Standard_Suite import *
-class Standard_Suite_Events(Standard_Suite_Events):
-
- _argmap_close = {
- 'saving' : 'savo',
- 'in_' : 'kfil',
- }
-
- def close(self, _object, _attributes={}, **_arguments):
- """close: Close an object
- Required argument: the objects to close
- Keyword argument saving: specifies whether or not changes should be saved before closing
- Keyword argument in_: the file in which to save the object
- Keyword argument _attributes: AppleEvent attribute dictionary
- """
- _code = 'core'
- _subcode = 'clos'
-
- aetools.keysubst(_arguments, self._argmap_close)
- _arguments['----'] = _object
-
- aetools.enumsubst(_arguments, 'savo', _Enum_savo)
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
- def data_size(self, _object, _attributes={}, **_arguments):
- """data size: Return the size in bytes of an object
- Required argument: the object whose data size is to be returned
- Keyword argument _attributes: AppleEvent attribute dictionary
- Returns: the size of the object in bytes
- """
- _code = 'core'
- _subcode = 'dsiz'
-
- if _arguments: raise TypeError, 'No optional args expected'
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
- def get(self, _object, _attributes={}, **_arguments):
- """get: Get the data for an object
- Required argument: the object whose data is to be returned
- Keyword argument _attributes: AppleEvent attribute dictionary
- Returns: The data from the object
- """
- _code = 'core'
- _subcode = 'getd'
-
- if _arguments: raise TypeError, 'No optional args expected'
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
- _argmap_make = {
- 'new' : 'kocl',
- 'at' : 'insh',
- 'with_data' : 'data',
- 'with_properties' : 'prdt',
- }
-
- def make(self, _no_object=None, _attributes={}, **_arguments):
- """make: Make a new element
- Keyword argument new: the class of the new element
- Keyword argument at: the location at which to insert the element
- Keyword argument with_data: the initial data for the element
- Keyword argument with_properties: the initial values for the properties of the element
- Keyword argument _attributes: AppleEvent attribute dictionary
- Returns: Object specifier for the new element
- """
- _code = 'core'
- _subcode = 'crel'
-
- aetools.keysubst(_arguments, self._argmap_make)
- if _no_object != None: raise TypeError, 'No direct arg expected'
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
- def open(self, _object, _attributes={}, **_arguments):
- """open: Open the specified object(s)
- Required argument: Objects to open. Can be a list of files or an object specifier.
- Keyword argument _attributes: AppleEvent attribute dictionary
- """
- _code = 'aevt'
- _subcode = 'odoc'
-
- if _arguments: raise TypeError, 'No optional args expected'
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
- def print_(self, _object, _attributes={}, **_arguments):
- """print: Print the specified object(s)
- Required argument: Objects to print. Can be a list of files or an object specifier.
- Keyword argument _attributes: AppleEvent attribute dictionary
- """
- _code = 'aevt'
- _subcode = 'pdoc'
-
- if _arguments: raise TypeError, 'No optional args expected'
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
- _argmap_save = {
- 'in_' : 'kfil',
- 'as' : 'fltp',
- }
-
- def save(self, _object, _attributes={}, **_arguments):
- """save: save a set of objects
- Required argument: Objects to save.
- Keyword argument in_: the file in which to save the object(s)
- Keyword argument as: the file type of the document in which to save the data
- Keyword argument _attributes: AppleEvent attribute dictionary
- """
- _code = 'core'
- _subcode = 'save'
-
- aetools.keysubst(_arguments, self._argmap_save)
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
- _argmap_set = {
- 'to' : 'data',
- }
-
- def set(self, _object, _attributes={}, **_arguments):
- """set: Set an object\xd5s data
- Required argument: the object to change
- Keyword argument to: the new value
- Keyword argument _attributes: AppleEvent attribute dictionary
- """
- _code = 'core'
- _subcode = 'setd'
-
- aetools.keysubst(_arguments, self._argmap_set)
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
-
-class application(aetools.ComponentItem):
- """application - An application program """
- want = 'capp'
-# element 'cwin' as ['indx', 'name', 'rele']
-# element 'docu' as ['name']
-
-class window(aetools.ComponentItem):
- """window - A Window """
- want = 'cwin'
-class _Prop_bounds(aetools.NProperty):
- """bounds - the boundary rectangle for the window """
- which = 'pbnd'
- want = 'qdrt'
-class _Prop_closeable(aetools.NProperty):
- """closeable - Does the window have a close box? """
- which = 'hclb'
- want = 'bool'
-class _Prop_floating(aetools.NProperty):
- """floating - Does the window float? """
- which = 'isfl'
- want = 'bool'
-class _Prop_index(aetools.NProperty):
- """index - the number of the window """
- which = 'pidx'
- want = 'long'
-class _Prop_modal(aetools.NProperty):
- """modal - Is the window modal? """
- which = 'pmod'
- want = 'bool'
-class _Prop_name(aetools.NProperty):
- """name - the title of the window """
- which = 'pnam'
- want = 'itxt'
-class _Prop_position(aetools.NProperty):
- """position - upper left coordinates of window """
- which = 'ppos'
- want = 'QDpt'
-class _Prop_resizable(aetools.NProperty):
- """resizable - Is the window resizable? """
- which = 'prsz'
- want = 'bool'
-class _Prop_titled(aetools.NProperty):
- """titled - Does the window have a title bar? """
- which = 'ptit'
- want = 'bool'
-class _Prop_visible(aetools.NProperty):
- """visible - is the window visible? """
- which = 'pvis'
- want = 'bool'
-class _Prop_zoomable(aetools.NProperty):
- """zoomable - Is the window zoomable? """
- which = 'iszm'
- want = 'bool'
-class _Prop_zoomed(aetools.NProperty):
- """zoomed - Is the window zoomed? """
- which = 'pzum'
- want = 'bool'
-
-class document(aetools.ComponentItem):
- """document - A Document """
- want = 'docu'
-class _Prop_modified(aetools.NProperty):
- """modified - Has the document been modified since the last save? """
- which = 'imod'
- want = 'bool'
-application._superclassnames = []
-application._privpropdict = {
-}
-application._privelemdict = {
- 'document' : document,
- 'window' : window,
-}
-window._superclassnames = []
-window._privpropdict = {
- 'bounds' : _Prop_bounds,
- 'closeable' : _Prop_closeable,
- 'floating' : _Prop_floating,
- 'index' : _Prop_index,
- 'modal' : _Prop_modal,
- 'name' : _Prop_name,
- 'position' : _Prop_position,
- 'resizable' : _Prop_resizable,
- 'titled' : _Prop_titled,
- 'visible' : _Prop_visible,
- 'zoomable' : _Prop_zoomable,
- 'zoomed' : _Prop_zoomed,
-}
-window._privelemdict = {
-}
-document._superclassnames = []
-document._privpropdict = {
- 'modified' : _Prop_modified,
- 'name' : _Prop_name,
-}
-document._privelemdict = {
-}
-_Enum_savo = {
- 'yes' : 'yes ', # Save objects now
- 'no' : 'no ', # Do not save objects
- 'ask' : 'ask ', # Ask the user whether to save
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
- 'capp' : application,
- 'cwin' : window,
- 'docu' : document,
-}
-
-_propdeclarations = {
- 'hclb' : _Prop_closeable,
- 'imod' : _Prop_modified,
- 'isfl' : _Prop_floating,
- 'iszm' : _Prop_zoomable,
- 'pbnd' : _Prop_bounds,
- 'pidx' : _Prop_index,
- 'pmod' : _Prop_modal,
- 'pnam' : _Prop_name,
- 'ppos' : _Prop_position,
- 'prsz' : _Prop_resizable,
- 'ptit' : _Prop_titled,
- 'pvis' : _Prop_visible,
- 'pzum' : _Prop_zoomed,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
- 'savo' : _Enum_savo,
-}
diff --git a/Mac/OSX/Doc/HelpIndexingTool/__init__.py b/Mac/OSX/Doc/HelpIndexingTool/__init__.py
deleted file mode 100644
index 5359df5..0000000
--- a/Mac/OSX/Doc/HelpIndexingTool/__init__.py
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-Package generated from /Developer/Applications/Apple Help Indexing Tool.app
-"""
-import aetools
-Error = aetools.Error
-import Standard_Suite
-import Help_Indexing_Tool_Suite
-import odds_and_ends
-import Miscellaneous_Standards
-import Required_Suite
-
-
-_code_to_module = {
- 'CoRe' : Standard_Suite,
- 'HIT ' : Help_Indexing_Tool_Suite,
- 'Odds' : odds_and_ends,
- 'misc' : Miscellaneous_Standards,
- 'reqd' : Required_Suite,
-}
-
-
-
-_code_to_fullname = {
- 'CoRe' : ('HelpIndexingTool.Standard_Suite', 'Standard_Suite'),
- 'HIT ' : ('HelpIndexingTool.Help_Indexing_Tool_Suite', 'Help_Indexing_Tool_Suite'),
- 'Odds' : ('HelpIndexingTool.odds_and_ends', 'odds_and_ends'),
- 'misc' : ('HelpIndexingTool.Miscellaneous_Standards', 'Miscellaneous_Standards'),
- 'reqd' : ('HelpIndexingTool.Required_Suite', 'Required_Suite'),
-}
-
-from Standard_Suite import *
-from Help_Indexing_Tool_Suite import *
-from odds_and_ends import *
-from Miscellaneous_Standards import *
-from Required_Suite import *
-
-def getbaseclasses(v):
- if not getattr(v, '_propdict', None):
- v._propdict = {}
- v._elemdict = {}
- for superclassname in getattr(v, '_superclassnames', []):
- superclass = eval(superclassname)
- getbaseclasses(superclass)
- v._propdict.update(getattr(superclass, '_propdict', {}))
- v._elemdict.update(getattr(superclass, '_elemdict', {}))
- v._propdict.update(getattr(v, '_privpropdict', {}))
- v._elemdict.update(getattr(v, '_privelemdict', {}))
-
-import StdSuites
-
-#
-# Set property and element dictionaries now that all classes have been defined
-#
-getbaseclasses(window)
-getbaseclasses(application)
-getbaseclasses(document)
-getbaseclasses(application)
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
- 'cwin' : window,
- 'capp' : application,
- 'docu' : document,
- 'capp' : application,
-}
-
-
-class HelpIndexingTool(Standard_Suite_Events,
- Help_Indexing_Tool_Suite_Events,
- odds_and_ends_Events,
- Miscellaneous_Standards_Events,
- Required_Suite_Events,
- aetools.TalkTo):
- _signature = 'hiti'
-
- _moduleName = 'HelpIndexingTool'
diff --git a/Mac/OSX/Doc/HelpIndexingTool/odds_and_ends.py b/Mac/OSX/Doc/HelpIndexingTool/odds_and_ends.py
deleted file mode 100644
index 7ee46f3..0000000
--- a/Mac/OSX/Doc/HelpIndexingTool/odds_and_ends.py
+++ /dev/null
@@ -1,49 +0,0 @@
-"""Suite odds and ends: Things that should be in some standard suite, but aren\xd5t
-Level 1, version 1
-
-Generated from /Developer/Applications/Apple Help Indexing Tool.app
-AETE/AEUT resource version 1/1, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'Odds'
-
-class odds_and_ends_Events:
-
- def select(self, _object=None, _attributes={}, **_arguments):
- """select: Select the specified object
- Required argument: the object to select
- Keyword argument _attributes: AppleEvent attribute dictionary
- """
- _code = 'misc'
- _subcode = 'slct'
-
- if _arguments: raise TypeError, 'No optional args expected'
- _arguments['----'] = _object
-
-
- _reply, _arguments, _attributes = self.send(_code, _subcode,
- _arguments, _attributes)
- if _arguments.get('errn', 0):
- raise aetools.Error, aetools.decodeerror(_arguments)
- # XXXX Optionally decode result
- if _arguments.has_key('----'):
- return _arguments['----']
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Mac/OSX/Doc/README b/Mac/OSX/Doc/README
deleted file mode 100644
index 4f4d53d..0000000
--- a/Mac/OSX/Doc/README
+++ /dev/null
@@ -1,35 +0,0 @@
-In this directory you can build the Python documentation in a form that
-is suitable for access with Apple Help Viewer. This will enable the
-"Python Documentation" menu entries in the MacPython IDE Help menu.
-
-Unfortunately the procedure to build the docs is not very streamlined.
-
-First, edit setup.py. At the top, edit MAJOR_VERSION and MINOR_VERSION,
-and check that DESTDIR makes sense. The documentation will be installed
-inside PythonIDE.app.
-
-In DocBuild.initialize_options, set self.download to True if you want to
-download the docs. Set it to False if you want to build the docs from
-the source tree, but this requires LaTex and lots of other stuff.
-Doable, but not easy.
-
-Second, if you want to download the docs you may need to do a couple
-more edits. The way the docs are packaged will often change between
-major releases. Fiddle DocBuild.downloadDocs to make it do the right
-thing (download the docs from python.org, unpack them, rename the
-directory to "build/html").
-
-After these edits you should be ready to roll. "pythonw setup.py build"
-should download and unpack (or build) the docs. Next, it will do some
-magic to make the docs indexable. Finally, it will run the Apple Help
-Indexing Tool. (This last step is the reason you must use "pythonw" as
-opposed to "python"). Usually it will time out while waiting for AHIT to
-do its work. Wait until AHIT is done.
-
-Now you're ready to install with "python setup.py install".
-
-After this is done test your work. Fire up PythonIDE, and check that
-Help->Python Documentation brings up the documentation in the Help Viewer.
-Also open an IDE edit window, type something like "import sys", select
-"import", and use Help->Lookup in Python Documentation to check that the
-index has been generated correctly.
diff --git a/Mac/OSX/Doc/setup.py b/Mac/OSX/Doc/setup.py
deleted file mode 100644
index bd86a20..0000000
--- a/Mac/OSX/Doc/setup.py
+++ /dev/null
@@ -1,214 +0,0 @@
-# Build and install an Apple Help Viewer compatible version of the Python
-# documentation into the framework.
-# Code by Bill Fancher, with some modifications by Jack Jansen.
-#
-# You must run this as a two-step process
-# 1. python setupDocs.py build
-# 2. Wait for Apple Help Indexing Tool to finish
-# 3. python setupDocs.py install
-#
-# To do:
-# - test whether the docs are available locally before downloading
-# - fix buildDocsFromSource
-# - Get documentation version from sys.version, fallback to 2.2.1
-# - See if we can somehow detect that Apple Help Indexing Tool is finished
-# - data_files to setup() doesn't seem the right way to pass the arguments
-#
-import sys, os, re
-from distutils.cmd import Command
-from distutils.command.build import build
-from distutils.core import setup
-from distutils.file_util import copy_file
-from distutils.dir_util import copy_tree
-from distutils.log import log
-from distutils.spawn import spawn
-from distutils import sysconfig, dep_util
-from distutils.util import change_root
-import HelpIndexingTool
-import Carbon.File
-import time
-
-MAJOR_VERSION='2.4'
-MINOR_VERSION='2.4.1'
-DESTDIR='/Applications/MacPython-%s/PythonIDE.app/Contents/Resources/English.lproj/PythonDocumentation' % MAJOR_VERSION
-
-class DocBuild(build):
- def initialize_options(self):
- build.initialize_options(self)
- self.build_html = None
- self.build_dest = None
- self.download = 1
- self.doc_version = MINOR_VERSION # Only needed if download is true
-
- def finalize_options(self):
- build.finalize_options(self)
- if self.build_html is None:
- self.build_html = os.path.join(self.build_base, 'html')
- if self.build_dest is None:
- self.build_dest = os.path.join(self.build_base, 'PythonDocumentation')
-
- def spawn(self, *args):
- spawn(args, 1, self.verbose, self.dry_run)
-
- def downloadDocs(self):
- workdir = os.getcwd()
- # XXX Note: the next strings may change from version to version
- url = 'http://www.python.org/ftp/python/doc/%s/html-%s.tar.bz2' % \
- (self.doc_version,self.doc_version)
- tarfile = 'html-%s.tar.bz2' % self.doc_version
- dirname = 'Python-Docs-%s' % self.doc_version
-
- if os.path.exists(self.build_html):
- raise RuntimeError, '%s: already exists, please remove and try again' % self.build_html
- os.chdir(self.build_base)
- self.spawn('curl','-O', url)
- self.spawn('tar', '-xjf', tarfile)
- os.rename(dirname, 'html')
- os.chdir(workdir)
-## print "** Please unpack %s" % os.path.join(self.build_base, tarfile)
-## print "** Unpack the files into %s" % self.build_html
-## raise RuntimeError, "You need to unpack the docs manually"
-
- def buildDocsFromSource(self):
- srcdir = '../../..'
- docdir = os.path.join(srcdir, 'Doc')
- htmldir = os.path.join(docdir, 'html')
- spawn(('make','--directory', docdir, 'html'), 1, self.verbose, self.dry_run)
- self.mkpath(self.build_html)
- copy_tree(htmldir, self.build_html)
-
- def ensureHtml(self):
- if not os.path.exists(self.build_html):
- if self.download:
- self.downloadDocs()
- else:
- self.buildDocsFromSource()
-
- def hackIndex(self):
- ind_html = 'index.html'
- #print 'self.build_dest =', self.build_dest
- hackedIndex = file(os.path.join(self.build_dest, ind_html),'w')
- origIndex = file(os.path.join(self.build_html,ind_html))
- r = re.compile('<style type="text/css">.*</style>', re.DOTALL)
- hackedIndex.write(r.sub('<META NAME="AppleTitle" CONTENT="Python Documentation">',origIndex.read()))
-
- def hackFile(self,d,f):
- origPath = os.path.join(d,f)
- assert(origPath[:len(self.build_html)] == self.build_html)
- outPath = os.path.join(self.build_dest, d[len(self.build_html)+1:], f)
- (name, ext) = os.path.splitext(f)
- if os.path.isdir(origPath):
- self.mkpath(outPath)
- elif ext == '.html':
- if self.verbose: print 'hacking %s to %s' % (origPath,outPath)
- hackedFile = file(outPath, 'w')
- origFile = file(origPath,'r')
- hackedFile.write(self.r.sub('<dl><dt><dd>', origFile.read()))
- else:
- copy_file(origPath, outPath)
-
- def hackHtml(self):
- self.r = re.compile('<dl><dd>')
- os.path.walk(self.build_html, self.visit, None)
-
- def visit(self, dummy, dirname, filenames):
- for f in filenames:
- self.hackFile(dirname, f)
-
- def makeHelpIndex(self):
- app = '/Developer/Applications/Apple Help Indexing Tool.app'
- self.spawn('open', '-a', app , self.build_dest)
- print "Please wait until Apple Help Indexing Tool finishes before installing"
-
- def makeHelpIndex(self):
- app = HelpIndexingTool.HelpIndexingTool(start=1)
- app.open(Carbon.File.FSSpec(self.build_dest))
- sys.stderr.write("Waiting for Help Indexing Tool to start...")
- while 1:
- # This is bad design in the suite generation code!
- idle = app._get(HelpIndexingTool.Help_Indexing_Tool_Suite._Prop_idleStatus())
- time.sleep(10)
- if not idle: break
- sys.stderr.write(".")
- sys.stderr.write("\n")
- sys.stderr.write("Waiting for Help Indexing Tool to finish...")
- while 1:
- # This is bad design in the suite generation code!
- idle = app._get(HelpIndexingTool.Help_Indexing_Tool_Suite._Prop_idleStatus())
- time.sleep(10)
- if idle: break
- sys.stderr.write(".")
- sys.stderr.write("\n")
-
-
- def run(self):
- self.ensure_finalized()
- self.mkpath(self.build_base)
- self.ensureHtml()
- if not os.path.isdir(self.build_html):
- raise RuntimeError, \
- "Can't find source folder for documentation."
- self.mkpath(self.build_dest)
- if dep_util.newer(os.path.join(self.build_html,'index.html'), os.path.join(self.build_dest,'index.html')):
- self.mkpath(self.build_dest)
- self.hackHtml()
- self.hackIndex()
- self.makeHelpIndex()
-
-class AHVDocInstall(Command):
- description = "install Apple Help Viewer html files"
- user_options = [('install-doc=', 'd',
- 'directory to install HTML tree'),
- ('root=', None,
- "install everything relative to this alternate root directory"),
- ]
-
- def initialize_options(self):
- self.build_dest = None
- self.install_doc = None
- self.prefix = None
- self.root = None
-
- def finalize_options(self):
- self.set_undefined_options('install',
- ('prefix', 'prefix'),
- ('root', 'root'))
-# import pdb ; pdb.set_trace()
- build_cmd = self.get_finalized_command('build')
- if self.build_dest == None:
- build_cmd = self.get_finalized_command('build')
- self.build_dest = build_cmd.build_dest
- if self.install_doc == None:
- self.install_doc = os.path.join(self.prefix, DESTDIR)
- print 'INSTALL', self.build_dest, '->', self.install_doc
-
- def run(self):
- self.finalize_options()
- self.ensure_finalized()
- print "Running Installer"
- instloc = self.install_doc
- if self.root:
- instloc = change_root(self.root, instloc)
- self.mkpath(instloc)
- copy_tree(self.build_dest, instloc)
- print "Installation complete"
-
-def mungeVersion(infile, outfile):
- i = file(infile,'r')
- o = file(outfile,'w')
- o.write(re.sub('\$\(VERSION\)',sysconfig.get_config_var('VERSION'),i.read()))
- i.close()
- o.close()
-
-def main():
- # turn off warnings when deprecated modules are imported
-## import warnings
-## warnings.filterwarnings("ignore",category=DeprecationWarning)
- setup(name = 'Documentation',
- version = '%d.%d' % sys.version_info[:2],
- cmdclass = {'install_data':AHVDocInstall, 'build':DocBuild},
- data_files = ['dummy'],
- )
-
-if __name__ == '__main__':
- main()
diff --git a/Mac/OSX/IDLE/Info.plist b/Mac/OSX/IDLE/Info.plist
deleted file mode 100644
index bbe2ea1..0000000
--- a/Mac/OSX/IDLE/Info.plist
+++ /dev/null
@@ -1,55 +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>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleDocumentTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>py</string>
- <string>pyw</string>
- </array>
- <key>CFBundleTypeIconFile</key>
- <string>PythonSource.icns</string>
- <key>CFBundleTypeName</key>
- <string>Python Script</string>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- </dict>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>pyc</string>
- <string>pyo</string>
- </array>
- <key>CFBundleTypeIconFile</key>
- <string>PythonCompiled.icns</string>
- <key>CFBundleTypeName</key>
- <string>Python Bytecode Document</string>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- </dict>
- </array>
- <key>CFBundleExecutable</key>
- <string>IDLE</string>
- <key>CFBundleGetInfoString</key>
- <string>2.5, © 001-2006 Python Software Foundation</string>
- <key>CFBundleIconFile</key>
- <string>IDLE.icns</string>
- <key>CFBundleIdentifier</key>
- <string>org.python.IDLE</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>IDLE</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>2.5</string>
- <key>CFBundleVersion</key>
- <string>2.5</string>
-</dict>
-</plist>
diff --git a/Mac/OSX/IDLE/Makefile.in b/Mac/OSX/IDLE/Makefile.in
deleted file mode 100644
index 5ed1d5a..0000000
--- a/Mac/OSX/IDLE/Makefile.in
+++ /dev/null
@@ -1,54 +0,0 @@
-prefix=@prefix@
-CC=@CC@
-LD=@CC@
-BASECFLAGS=@BASECFLAGS@
-OPT=@OPT@
-CFLAGS=$(BASECFLAGS) $(OPT)
-LDFLAGS=@LDFLAGS@
-srcdir= @srcdir@
-VERSION= @VERSION@
-UNIVERSALSDK=@UNIVERSALSDK@
-builddir= ../../..
-
-RUNSHARED= @RUNSHARED@
-BUILDEXE= @BUILDEXEEXT@
-BUILDPYTHON= ../../../python$(BUILDEXE)
-
-# Deployment target selected during configure, to be checked
-# by distutils
-MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
-@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
-
-BUNDLEBULDER=$(srcdir)/../../../Lib/plat-mac/bundlebuilder.py
-
-PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
-
-all: IDLE.app
-
-install: IDLE.app $(srcdir)/config-main.def $(srcdir)/config-extensions.def
- test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)"
- -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app"
- cp -PR IDLE.app "$(DESTDIR)$(PYTHONAPPSDIR)"
- touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app"
- cp $(srcdir)/config-main.def "$(DESTDIR)$(prefix)/lib/python$(VERSION)/idlelib/config-main.def"
- cp $(srcdir)/config-extensions.def "$(DESTDIR)$(prefix)/lib/python$(VERSION)/idlelib/config-extensions.def"
-
-clean:
- rm -rf IDLE.app
-
-IDLE.app: \
- $(srcdir)/../Icons/IDLE.icns $(srcdir)/idlemain.py \
- $(srcdir)/../Icons/PythonSource.icns \
- $(srcdir)/../Icons/PythonCompiled.icns
- rm -fr IDLE.app
- $(RUNSHARED) $(BUILDPYTHON) $(BUNDLEBULDER) \
- --builddir=. \
- --name=IDLE \
- --link-exec \
- --plist=$(srcdir)/Info.plist \
- --mainprogram=$(srcdir)/idlemain.py \
- --iconfile=$(srcdir)/../Icons/IDLE.icns \
- --resource=$(srcdir)/../Icons/PythonSource.icns \
- --resource=$(srcdir)/../Icons/PythonCompiled.icns \
- --python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \
- build
diff --git a/Mac/OSX/IDLE/config-extensions.def b/Mac/OSX/IDLE/config-extensions.def
deleted file mode 100644
index c17f068..0000000
--- a/Mac/OSX/IDLE/config-extensions.def
+++ /dev/null
@@ -1,88 +0,0 @@
-# config-extensions.def
-#
-# IDLE reads several config files to determine user preferences. This
-# file is the default configuration file for IDLE extensions settings.
-#
-# Each extension must have at least one section, named after the extension
-# module. This section must contain an 'enable' item (=1 to enable the
-# extension, =0 to disable it), it may contain 'enable_editor' or 'enable_shell'
-# items, to apply it only to editor/shell windows, and may also contain any
-# other general configuration items for the extension.
-#
-# Each extension must define at least one section named ExtensionName_bindings
-# or ExtensionName_cfgBindings. If present, ExtensionName_bindings defines
-# virtual event bindings for the extension that are not user re-configurable.
-# If present, ExtensionName_cfgBindings defines virtual event bindings for the
-# extension that may be sensibly re-configured.
-#
-# If there are no keybindings for a menus' virtual events, include lines like
-# <<toggle-code-context>>= (See [CodeContext], below.)
-#
-# Currently it is necessary to manually modify this file to change extension
-# key bindings and default values. To customize, create
-# ~/.idlerc/config-extensions.cfg and append the appropriate customized
-# section(s). Those sections will override the defaults in this file.
-#
-# Note: If a keybinding is already in use when the extension is
-# loaded, the extension's virtual event's keybinding will be set to ''.
-#
-# See config-keys.def for notes on specifying keys and extend.txt for
-# information on creating IDLE extensions.
-
-[FormatParagraph]
-enable=1
-[FormatParagraph_cfgBindings]
-format-paragraph=<Option-Key-q>
-
-[AutoExpand]
-enable=1
-[AutoExpand_cfgBindings]
-expand-word=<Option-Key-slash>
-
-[ZoomHeight]
-enable=1
-[ZoomHeight_cfgBindings]
-zoom-height=<Option-Key-0>
-
-[ScriptBinding]
-enable=1
-[ScriptBinding_cfgBindings]
-run-module=<Key-F5>
-check-module=<Option-Key-x>
-
-[CallTips]
-enable=1
-[CallTips_cfgBindings]
-force-open-calltip=<Control-Key-backslash>
-[CallTips_bindings]
-try-open-calltip=<KeyRelease-parenleft>
-refresh-calltip=<KeyRelease-parenright> <KeyRelease-0>
-
-[ParenMatch]
-enable=1
-style= expression
-flash-delay= 500
-bell= 1
-[ParenMatch_cfgBindings]
-flash-paren=<Control-Key-0>
-[ParenMatch_bindings]
-paren-closed=<KeyRelease-parenright> <KeyRelease-bracketright> <KeyRelease-braceright>
-
-[AutoComplete]
-enable=1
-popupwait=2000
-[AutoComplete_cfgBindings]
-force-open-completions=<Control-Key-space>
-[AutoComplete_bindings]
-autocomplete=<Key-Tab>
-try-open-completions=<KeyRelease-period> <KeyRelease-slash> <KeyRelease-backslash>
-
-[CodeContext]
-enable=1
-enable_shell=0
-numlines=3
-visible=0
-bgcolor=LightGray
-fgcolor=Black
-[CodeContext_bindings]
-toggle-code-context=
diff --git a/Mac/OSX/IDLE/config-main.def b/Mac/OSX/IDLE/config-main.def
deleted file mode 100644
index 1cdc0c5..0000000
--- a/Mac/OSX/IDLE/config-main.def
+++ /dev/null
@@ -1,79 +0,0 @@
-# IDLE reads several config files to determine user preferences. This
-# file is the default config file for general idle settings.
-#
-# When IDLE starts, it will look in
-# the following two sets of files, in order:
-#
-# default configuration
-# ---------------------
-# config-main.def the default general config file
-# config-extensions.def the default extension config file
-# config-highlight.def the default highlighting config file
-# config-keys.def the default keybinding config file
-#
-# user configuration
-# -------------------
-# ~/.idlerc/config-main.cfg the user general config file
-# ~/.idlerc/config-extensions.cfg the user extension config file
-# ~/.idlerc/config-highlight.cfg the user highlighting config file
-# ~/.idlerc/config-keys.cfg the user keybinding config file
-#
-# On Windows2000 and Windows XP the .idlerc directory is at
-# Documents and Settings\<username>\.idlerc
-#
-# On Windows98 it is at c:\.idlerc
-#
-# Any options the user saves through the config dialog will be saved to
-# the relevant user config file. Reverting any general setting to the
-# default causes that entry to be wiped from the user file and re-read
-# from the default file. User highlighting themes or keybinding sets are
-# retained unless specifically deleted within the config dialog. Choosing
-# one of the default themes or keysets just applies the relevant settings
-# from the default file.
-#
-# Additional help sources are listed in the [HelpFiles] section and must be
-# viewable by a web browser (or the Windows Help viewer in the case of .chm
-# files). These sources will be listed on the Help menu. The pattern is
-# <sequence_number = menu item;/path/to/help/source>
-# You can't use a semi-colon in a menu item or path. The path will be platform
-# specific because of path separators, drive specs etc.
-#
-# It is best to use the Configuration GUI to set up additional help sources!
-# Example:
-#1 = My Extra Help Source;/usr/share/doc/foo/index.html
-#2 = Another Help Source;/path/to/another.pdf
-
-[General]
-editor-on-startup= 0
-autosave= 0
-print-command-posix=lpr %s
-print-command-win=start /min notepad /p %s
-delete-exitfunc= 1
-
-[EditorWindow]
-width= 80
-height= 40
-font= courier
-font-size= 10
-font-bold= 0
-encoding= none
-
-[FormatParagraph]
-paragraph=70
-
-[Indent]
-use-spaces= 1
-num-spaces= 4
-
-[Theme]
-default= 1
-name= IDLE Classic
-
-[Keys]
-default= 1
-name= IDLE Classic Mac
-
-[History]
-cyclic=1
-
-[HelpFiles]
diff --git a/Mac/OSX/IDLE/idlemain.py b/Mac/OSX/IDLE/idlemain.py
deleted file mode 100644
index aa75d4c..0000000
--- a/Mac/OSX/IDLE/idlemain.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Bootstrap script for IDLE as an application bundle.
-"""
-import sys, os
-
-from idlelib.PyShell import main
-
-# Change the current directory the user's home directory, that way we'll get
-# a more useful default location in the open/save dialogs.
-os.chdir(os.path.expanduser('~/Documents'))
-
-
-# Make sure sys.executable points to the python interpreter inside the
-# framework, instead of at the helper executable inside the application
-# bundle (the latter works, but doesn't allow access to the window server)
-sys.executable = os.path.join(sys.prefix, 'bin', 'python')
-
-# Look for the -psn argument that the launcher adds and remove it, it will
-# only confuse the IDLE startup code.
-for idx, value in enumerate(sys.argv):
- if value.startswith('-psn_'):
- del sys.argv[idx]
- break
-
-#argvemulator.ArgvCollector().mainloop()
-if __name__ == '__main__':
- main()
diff --git a/Mac/OSX/PythonLauncher/English.lproj/Credits.rtf b/Mac/OSX/PythonLauncher/English.lproj/Credits.rtf
deleted file mode 100644
index 930ca22..0000000
--- a/Mac/OSX/PythonLauncher/English.lproj/Credits.rtf
+++ /dev/null
@@ -1,30 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf100
-{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\b\fs24 \cf0 Engineering:
-\f1\b0 \
- Jack Jansen\
-\
-
-\f0\b Human Interface Design:
-\f1\b0 \
- Jack Jansen\
-\
-
-\f0\b Testing:
-\f1\b0 \
- Jack Jansen\
- Pythonmac-SIG@python.org\
-\
-
-\f0\b Documentation:
-\f1\b0 \
- Missing\
-\
-
-\f0\b With special thanks to:
-\f1\b0 \
- Guido, of course\
-} \ No newline at end of file
diff --git a/Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/classes.nib b/Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 47b40ab..0000000
--- a/Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- IBClasses = (
- {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
- {
- ACTIONS = {showPreferences = id; };
- CLASS = MyAppDelegate;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/info.nib b/Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/info.nib
deleted file mode 100644
index b96759a..0000000
--- a/Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/info.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
-<dict>
- <key>IBDocumentLocation</key>
- <string>99 33 356 240 0 0 800 578 </string>
- <key>IBEditorPositions</key>
- <dict>
- <key>29</key>
- <string>82 396 318 44 0 0 800 578 </string>
- </dict>
- <key>IBFramework Version</key>
- <string>263.2</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>29</integer>
- </array>
- <key>IBSystem Version</key>
- <string>5S66</string>
-</dict>
-</plist>
diff --git a/Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/objects.nib b/Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 532a5c8..0000000
--- a/Mac/OSX/PythonLauncher/English.lproj/MainMenu.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/classes.nib b/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/classes.nib
deleted file mode 100644
index bcdc0cd..0000000
--- a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/classes.nib
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- IBClasses = (
- {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
- {
- ACTIONS = {"do_apply" = id; "do_cancel" = id; "do_reset" = id; "do_run" = id; };
- CLASS = MyDocument;
- LANGUAGE = ObjC;
- OUTLETS = {
- commandline = NSTextField;
- debug = NSButton;
- honourhashbang = NSButton;
- inspect = NSButton;
- interpreter = NSTextField;
- nosite = NSButton;
- optimize = NSButton;
- others = NSTextField;
- scriptargs = NSTextField;
- tabs = NSButton;
- verbose = NSButton;
- "with_terminal" = NSButton;
- };
- SUPERCLASS = NSDocument;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/info.nib b/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/info.nib
deleted file mode 100644
index e258c72..0000000
--- a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/info.nib
+++ /dev/null
@@ -1,16 +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>IBDocumentLocation</key>
- <string>398 60 356 240 0 0 1024 746 </string>
- <key>IBFramework Version</key>
- <string>291.0</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>5</integer>
- </array>
- <key>IBSystem Version</key>
- <string>6L60</string>
-</dict>
-</plist>
diff --git a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/objects.nib b/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/objects.nib
deleted file mode 100644
index 0473a31..0000000
--- a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/classes.nib b/Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/classes.nib
deleted file mode 100644
index 467aa8b..0000000
--- a/Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/classes.nib
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- IBClasses = (
- {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
- {
- ACTIONS = {"do_apply" = id; "do_filetype" = id; "do_reset" = id; };
- CLASS = PreferencesWindowController;
- LANGUAGE = ObjC;
- OUTLETS = {
- commandline = NSTextField;
- debug = NSButton;
- filetype = NSPopUpButton;
- honourhashbang = NSButton;
- inspect = NSButton;
- interpreter = NSTextField;
- nosite = NSButton;
- optimize = NSButton;
- others = NSTextField;
- tabs = NSButton;
- verbose = NSButton;
- "with_terminal" = NSButton;
- };
- SUPERCLASS = NSWindowController;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/info.nib b/Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/info.nib
deleted file mode 100644
index bc558f7..0000000
--- a/Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/info.nib
+++ /dev/null
@@ -1,16 +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>IBDocumentLocation</key>
- <string>565 235 519 534 0 0 1280 1002 </string>
- <key>IBFramework Version</key>
- <string>364.0</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>5</integer>
- </array>
- <key>IBSystem Version</key>
- <string>7H63</string>
-</dict>
-</plist>
diff --git a/Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/objects.nib b/Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/objects.nib
deleted file mode 100644
index 3dfed33..0000000
--- a/Mac/OSX/PythonLauncher/English.lproj/PreferenceWindow.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/Mac/OSX/PythonLauncher/FileSettings.h b/Mac/OSX/PythonLauncher/FileSettings.h
deleted file mode 100755
index d807bae..0000000
--- a/Mac/OSX/PythonLauncher/FileSettings.h
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// FileSettings.h
-// PythonLauncher
-//
-// Created by Jack Jansen on Sun Jul 21 2002.
-// Copyright (c) 2002 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@protocol FileSettingsSource
-- (NSString *) interpreter;
-- (BOOL) honourhashbang;
-- (BOOL) debug;
-- (BOOL) verbose;
-- (BOOL) inspect;
-- (BOOL) optimize;
-- (BOOL) nosite;
-- (BOOL) tabs;
-- (NSString *) others;
-- (BOOL) with_terminal;
-- (NSString *) scriptargs;
-@end
-
-@interface FileSettings : NSObject <FileSettingsSource>
-{
- NSString *interpreter; // The pathname of the interpreter to use
- NSArray *interpreters; // List of known interpreters
- BOOL honourhashbang; // #! line overrides interpreter
- BOOL debug; // -d option: debug parser
- BOOL verbose; // -v option: verbose import
- BOOL inspect; // -i option: interactive mode after script
- BOOL optimize; // -O option: optimize bytecode
- BOOL nosite; // -S option: don't import site.py
- BOOL tabs; // -t option: warn about inconsistent tabs
- NSString *others; // other options
- NSString *scriptargs; // script arguments (not for preferences)
- BOOL with_terminal; // Run in terminal window
-
- FileSettings *origsource;
- NSString *prefskey;
-}
-
-+ (id)getDefaultsForFileType: (NSString *)filetype;
-+ (id)getFactorySettingsForFileType: (NSString *)filetype;
-+ (id)newSettingsForFileType: (NSString *)filetype;
-
-//- (id)init;
-- (id)initForFileType: (NSString *)filetype;
-- (id)initForFSDefaultFileType: (NSString *)filetype;
-- (id)initForDefaultFileType: (NSString *)filetype;
-//- (id)initWithFileSettings: (FileSettings *)source;
-
-- (void)updateFromSource: (id <FileSettingsSource>)source;
-- (NSString *)commandLineForScript: (NSString *)script;
-
-//- (void)applyFactorySettingsForFileType: (NSString *)filetype;
-//- (void)saveDefaults;
-//- (void)applyUserDefaults: (NSString *)filetype;
-- (void)applyValuesFromDict: (NSDictionary *)dict;
-- (void)reset;
-- (NSArray *) interpreters;
-
-@end
diff --git a/Mac/OSX/PythonLauncher/FileSettings.m b/Mac/OSX/PythonLauncher/FileSettings.m
deleted file mode 100755
index fc3937b..0000000
--- a/Mac/OSX/PythonLauncher/FileSettings.m
+++ /dev/null
@@ -1,298 +0,0 @@
-//
-// FileSettings.m
-// PythonLauncher
-//
-// Created by Jack Jansen on Sun Jul 21 2002.
-// Copyright (c) 2002 __MyCompanyName__. All rights reserved.
-//
-
-#import "FileSettings.h"
-
-@implementation FileSettings
-
-+ (id)getFactorySettingsForFileType: (NSString *)filetype
-{
- static FileSettings *fsdefault_py, *fsdefault_pyw, *fsdefault_pyc;
- FileSettings **curdefault;
-
- if ([filetype isEqualToString: @"Python Script"]) {
- curdefault = &fsdefault_py;
- } else if ([filetype isEqualToString: @"Python GUI Script"]) {
- curdefault = &fsdefault_pyw;
- } else if ([filetype isEqualToString: @"Python Bytecode Document"]) {
- curdefault = &fsdefault_pyc;
- } else {
- NSLog(@"Funny File Type: %@\n", filetype);
- curdefault = &fsdefault_py;
- filetype = @"Python Script";
- }
- if (!*curdefault) {
- *curdefault = [[FileSettings new] initForFSDefaultFileType: filetype];
- }
- return *curdefault;
-}
-
-+ (id)getDefaultsForFileType: (NSString *)filetype
-{
- static FileSettings *default_py, *default_pyw, *default_pyc;
- FileSettings **curdefault;
-
- if ([filetype isEqualToString: @"Python Script"]) {
- curdefault = &default_py;
- } else if ([filetype isEqualToString: @"Python GUI Script"]) {
- curdefault = &default_pyw;
- } else if ([filetype isEqualToString: @"Python Bytecode Document"]) {
- curdefault = &default_pyc;
- } else {
- NSLog(@"Funny File Type: %@\n", filetype);
- curdefault = &default_py;
- filetype = @"Python Script";
- }
- if (!*curdefault) {
- *curdefault = [[FileSettings new] initForDefaultFileType: filetype];
- }
- return *curdefault;
-}
-
-+ (id)newSettingsForFileType: (NSString *)filetype
-{
- FileSettings *cur;
-
- cur = [FileSettings new];
- [cur initForFileType: filetype];
- return [cur retain];
-}
-
-- (id)initWithFileSettings: (FileSettings *)source
-{
- self = [super init];
- if (!self) return self;
-
- interpreter = [source->interpreter retain];
- honourhashbang = source->honourhashbang;
- debug = source->debug;
- verbose = source->verbose;
- inspect = source->inspect;
- optimize = source->optimize;
- nosite = source->nosite;
- tabs = source->tabs;
- others = [source->others retain];
- scriptargs = [source->scriptargs retain];
- with_terminal = source->with_terminal;
- prefskey = source->prefskey;
- if (prefskey) [prefskey retain];
-
- return self;
-}
-
-- (id)initForFileType: (NSString *)filetype
-{
- FileSettings *defaults;
-
- defaults = [FileSettings getDefaultsForFileType: filetype];
- self = [self initWithFileSettings: defaults];
- origsource = [defaults retain];
- return self;
-}
-
-//- (id)init
-//{
-// self = [self initForFileType: @"Python Script"];
-// return self;
-//}
-
-- (id)initForFSDefaultFileType: (NSString *)filetype
-{
- int i;
- NSString *filename;
- NSDictionary *dict;
- static NSDictionary *factorySettings;
-
- self = [super init];
- if (!self) return self;
-
- if (factorySettings == NULL) {
- NSBundle *bdl = [NSBundle mainBundle];
- NSString *path = [ bdl pathForResource: @"factorySettings"
- ofType: @"plist"];
- factorySettings = [[NSDictionary dictionaryWithContentsOfFile:
- path] retain];
- if (factorySettings == NULL) {
- NSLog(@"Missing %@", path);
- return NULL;
- }
- }
- dict = [factorySettings objectForKey: filetype];
- if (dict == NULL) {
- NSLog(@"factorySettings.plist misses file type \"%@\"", filetype);
- interpreter = [@"no default found" retain];
- return NULL;
- }
- [self applyValuesFromDict: dict];
- interpreters = [dict objectForKey: @"interpreter_list"];
- interpreter = NULL;
- for (i=0; i < [interpreters count]; i++) {
- filename = [interpreters objectAtIndex: i];
- filename = [filename stringByExpandingTildeInPath];
- if ([[NSFileManager defaultManager] fileExistsAtPath: filename]) {
- interpreter = [filename retain];
- break;
- }
- }
- if (interpreter == NULL)
- interpreter = [@"no default found" retain];
- origsource = NULL;
- return self;
-}
-
-- (void)applyUserDefaults: (NSString *)filetype
-{
- NSUserDefaults *defaults;
- NSDictionary *dict;
-
- defaults = [NSUserDefaults standardUserDefaults];
- dict = [defaults dictionaryForKey: filetype];
- if (!dict)
- return;
- [self applyValuesFromDict: dict];
-}
-
-- (id)initForDefaultFileType: (NSString *)filetype
-{
- FileSettings *fsdefaults;
-
- fsdefaults = [FileSettings getFactorySettingsForFileType: filetype];
- self = [self initWithFileSettings: fsdefaults];
- if (!self) return self;
- interpreters = [fsdefaults->interpreters retain];
- scriptargs = [@"" retain];
- [self applyUserDefaults: filetype];
- prefskey = [filetype retain];
- return self;
-}
-
-- (void)reset
-{
- if (origsource) {
- [self updateFromSource: origsource];
- } else {
- FileSettings *fsdefaults;
- fsdefaults = [FileSettings getFactorySettingsForFileType: prefskey];
- [self updateFromSource: fsdefaults];
- }
-}
-
-- (void)updateFromSource: (id <FileSettingsSource>)source
-{
- interpreter = [[source interpreter] retain];
- honourhashbang = [source honourhashbang];
- debug = [source debug];
- verbose = [source verbose];
- inspect = [source inspect];
- optimize = [source optimize];
- nosite = [source nosite];
- tabs = [source tabs];
- others = [[source others] retain];
- scriptargs = [[source scriptargs] retain];
- with_terminal = [source with_terminal];
- // And if this is a user defaults object we also save the
- // values
- if (!origsource) {
- NSUserDefaults *defaults;
- NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
- interpreter, @"interpreter",
- [NSNumber numberWithBool: honourhashbang], @"honourhashbang",
- [NSNumber numberWithBool: debug], @"debug",
- [NSNumber numberWithBool: verbose], @"verbose",
- [NSNumber numberWithBool: inspect], @"inspect",
- [NSNumber numberWithBool: optimize], @"optimize",
- [NSNumber numberWithBool: nosite], @"nosite",
- [NSNumber numberWithBool: nosite], @"nosite",
- others, @"others",
- scriptargs, @"scriptargs",
- [NSNumber numberWithBool: with_terminal], @"with_terminal",
- nil];
- defaults = [NSUserDefaults standardUserDefaults];
- [defaults setObject: dict forKey: prefskey];
- }
-}
-
-- (void)applyValuesFromDict: (NSDictionary *)dict
-{
- id value;
-
- value = [dict objectForKey: @"interpreter"];
- if (value) interpreter = [value retain];
- value = [dict objectForKey: @"honourhashbang"];
- if (value) honourhashbang = [value boolValue];
- value = [dict objectForKey: @"debug"];
- if (value) debug = [value boolValue];
- value = [dict objectForKey: @"verbose"];
- if (value) verbose = [value boolValue];
- value = [dict objectForKey: @"inspect"];
- if (value) inspect = [value boolValue];
- value = [dict objectForKey: @"optimize"];
- if (value) optimize = [value boolValue];
- value = [dict objectForKey: @"nosite"];
- if (value) nosite = [value boolValue];
- value = [dict objectForKey: @"nosite"];
- if (value) tabs = [value boolValue];
- value = [dict objectForKey: @"others"];
- if (value) others = [value retain];
- value = [dict objectForKey: @"scriptargs"];
- if (value) scriptargs = [value retain];
- value = [dict objectForKey: @"with_terminal"];
- if (value) with_terminal = [value boolValue];
-}
-
-- (NSString *)commandLineForScript: (NSString *)script
-{
- NSString *cur_interp = NULL;
- char hashbangbuf[1024];
- FILE *fp;
- char *p;
-
- if (honourhashbang &&
- (fp=fopen([script cString], "r")) &&
- fgets(hashbangbuf, sizeof(hashbangbuf), fp) &&
- strncmp(hashbangbuf, "#!", 2) == 0 &&
- (p=strchr(hashbangbuf, '\n'))) {
- *p = '\0';
- p = hashbangbuf + 2;
- while (*p == ' ') p++;
- cur_interp = [NSString stringWithCString: p];
- }
- if (!cur_interp)
- cur_interp = interpreter;
-
- return [NSString stringWithFormat:
- @"\"%@\"%s%s%s%s%s%s %@ \"%@\" %@ %s",
- cur_interp,
- debug?" -d":"",
- verbose?" -v":"",
- inspect?" -i":"",
- optimize?" -O":"",
- nosite?" -S":"",
- tabs?" -t":"",
- others,
- script,
- scriptargs,
- with_terminal? "&& echo Exit status: $? && exit 1" : " &"];
-}
-
-- (NSArray *) interpreters { return interpreters;};
-
-// FileSettingsSource protocol
-- (NSString *) interpreter { return interpreter;};
-- (BOOL) honourhashbang { return honourhashbang; };
-- (BOOL) debug { return debug;};
-- (BOOL) verbose { return verbose;};
-- (BOOL) inspect { return inspect;};
-- (BOOL) optimize { return optimize;};
-- (BOOL) nosite { return nosite;};
-- (BOOL) tabs { return tabs;};
-- (NSString *) others { return others;};
-- (NSString *) scriptargs { return scriptargs;};
-- (BOOL) with_terminal { return with_terminal;};
-
-@end
diff --git a/Mac/OSX/PythonLauncher/Info.plist b/Mac/OSX/PythonLauncher/Info.plist
deleted file mode 100644
index 1dd795f..0000000
--- a/Mac/OSX/PythonLauncher/Info.plist
+++ /dev/null
@@ -1,65 +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>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleDocumentTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>py</string>
- <string>pyw</string>
- </array>
- <key>CFBundleTypeIconFile</key>
- <string>PythonSource.icns</string>
- <key>CFBundleTypeName</key>
- <string>Python Script</string>
- <key>CFBundleTypeRole</key>
- <string>Viewer</string>
- <key>NSDocumentClass</key>
- <string>MyDocument</string>
- </dict>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>pyc</string>
- <string>pyo</string>
- </array>
- <key>CFBundleTypeIconFile</key>
- <string>PythonCompiled.icns</string>
- <key>CFBundleTypeName</key>
- <string>Python Bytecode Document</string>
- <key>CFBundleTypeRole</key>
- <string>Viewer</string>
- <key>NSDocumentClass</key>
- <string>MyDocument</string>
- </dict>
- </array>
- <key>CFBundleExecutable</key>
- <string>PythonLauncher</string>
- <key>CFBundleGetInfoString</key>
- <string>2.5, © 001-2006 Python Software Foundation</string>
- <key>CFBundleIconFile</key>
- <string>PythonLauncher.icns</string>
- <key>CFBundleIdentifier</key>
- <string>org.python.PythonLauncher</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>Python Launcher</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>2.5</string>
- <key>CFBundleSignature</key>
- <string>PytL</string>
- <key>CFBundleVersion</key>
- <string>2.5</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
diff --git a/Mac/OSX/PythonLauncher/Makefile.in b/Mac/OSX/PythonLauncher/Makefile.in
deleted file mode 100644
index e6dacb3..0000000
--- a/Mac/OSX/PythonLauncher/Makefile.in
+++ /dev/null
@@ -1,78 +0,0 @@
-CC=@CC@
-LD=@CC@
-BASECFLAGS=@BASECFLAGS@
-OPT=@OPT@
-CFLAGS=$(BASECFLAGS) $(OPT)
-LDFLAGS=@LDFLAGS@
-srcdir= @srcdir@
-VERSION= @VERSION@
-UNIVERSALSDK=@UNIVERSALSDK@
-builddir= ../../..
-
-RUNSHARED= @RUNSHARED@
-BUILDEXE= @BUILDEXEEXT@
-BUILDPYTHON= ../../../python$(BUILDEXE)
-
-# Deployment target selected during configure, to be checked
-# by distutils
-MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
-@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
-
-BUNDLEBULDER=$(srcdir)/../../../Lib/plat-mac/bundlebuilder.py
-
-PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
-OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
-
-all: Python\ Launcher.app
-
-install: Python\ Launcher.app
- test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)"
- -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
- cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)"
- touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
-
-clean:
- rm -f *.o "Python Launcher"
- rm -rf "Python Launcher.app"
-
-Python\ Launcher.app: \
- Python\ Launcher $(srcdir)/../Icons/PythonLauncher.icns \
- $(srcdir)/../Icons/PythonSource.icns \
- $(srcdir)/../Icons/PythonCompiled.icns \
- $(srcdir)/factorySettings.plist
- rm -fr "Python Launcher.app"
- $(RUNSHARED) $(BUILDPYTHON) $(BUNDLEBULDER) \
- --builddir=. \
- --name="Python Launcher" \
- --executable="Python Launcher" \
- --iconfile=$(srcdir)/../Icons/PythonLauncher.icns \
- --bundle-id=org.python.PythonLauncher \
- --resource=$(srcdir)/../Icons/PythonSource.icns \
- --resource=$(srcdir)/../Icons/PythonCompiled.icns \
- --resource=$(srcdir)/English.lproj \
- --resource=$(srcdir)/factorySettings.plist \
- --plist=$(srcdir)/Info.plist \
- build
- find "Python Launcher.app" -name '.svn' -print0 | xargs -0 rm -r
-
-
-FileSettings.o: $(srcdir)/FileSettings.m
- $(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m
-
-MyAppDelegate.o: $(srcdir)/MyAppDelegate.m
- $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m
-
-MyDocument.o: $(srcdir)/MyDocument.m
- $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m
-
-PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m
- $(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m
-
-doscript.o: $(srcdir)/doscript.m
- $(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m
-
-main.o: $(srcdir)/main.m
- $(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m
-
-Python\ Launcher: $(OBJECTS)
- $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon
diff --git a/Mac/OSX/PythonLauncher/MyAppDelegate.h b/Mac/OSX/PythonLauncher/MyAppDelegate.h
deleted file mode 100644
index 097b541..0000000
--- a/Mac/OSX/PythonLauncher/MyAppDelegate.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* MyAppDelegate */
-
-#import <Cocoa/Cocoa.h>
-
-@interface MyAppDelegate : NSObject
-{
- BOOL initial_action_done;
- BOOL should_terminate;
-}
-- (id)init;
-- (IBAction)showPreferences:(id)sender;
-- (BOOL)shouldShowUI;
-- (BOOL)shouldTerminate;
-- (void)testFileTypeBinding;
-@end
diff --git a/Mac/OSX/PythonLauncher/MyAppDelegate.m b/Mac/OSX/PythonLauncher/MyAppDelegate.m
deleted file mode 100644
index a5ba751..0000000
--- a/Mac/OSX/PythonLauncher/MyAppDelegate.m
+++ /dev/null
@@ -1,96 +0,0 @@
-#import "MyAppDelegate.h"
-#import "PreferencesWindowController.h"
-#import <Carbon/Carbon.h>
-#import <ApplicationServices/ApplicationServices.h>
-
-@implementation MyAppDelegate
-
-- (id)init
-{
- self = [super init];
- initial_action_done = NO;
- should_terminate = NO;
- return self;
-}
-
-- (IBAction)showPreferences:(id)sender
-{
- [PreferencesWindowController getPreferencesWindow];
-}
-
-- (void)applicationDidFinishLaunching:(NSNotification *)notification
-{
- // Test that the file mappings are correct
- [self testFileTypeBinding];
- // If we were opened because of a file drag or doubleclick
- // we've set initial_action_done in shouldShowUI
- // Otherwise we open a preferences dialog.
- if (!initial_action_done) {
- initial_action_done = YES;
- [self showPreferences: self];
- }
-}
-
-- (BOOL)shouldShowUI
-{
- // if this call comes before applicationDidFinishLaunching: we
- // should terminate immedeately after starting the script.
- if (!initial_action_done)
- should_terminate = YES;
- initial_action_done = YES;
- if( GetCurrentKeyModifiers() & optionKey )
- return YES;
- return NO;
-}
-
-- (BOOL)shouldTerminate
-{
- return should_terminate;
-}
-
-- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender
-{
- return NO;
-}
-
-- (void)testFileTypeBinding
-{
- NSURL *ourUrl;
- OSStatus err;
- FSRef appRef;
- NSURL *appUrl;
- static NSString *extensions[] = { @"py", @"pyw", @"pyc", NULL};
- NSString **ext_p;
- int i;
-
- if ([[NSUserDefaults standardUserDefaults] boolForKey: @"SkipFileBindingTest"])
- return;
- ourUrl = [NSURL fileURLWithPath: [[NSBundle mainBundle] bundlePath]];
- for( ext_p = extensions; *ext_p; ext_p++ ) {
- err = LSGetApplicationForInfo(
- kLSUnknownType,
- kLSUnknownCreator,
- (CFStringRef)*ext_p,
- kLSRolesViewer,
- &appRef,
- (CFURLRef *)&appUrl);
- if (err || ![appUrl isEqual: ourUrl] ) {
- i = NSRunAlertPanel(@"File type binding",
- @"PythonLauncher is not the default application for all " \
- @"Python script types. You should fix this with the " \
- @"Finder's \"Get Info\" command.\n\n" \
- @"See \"Changing the application that opens a file\" in " \
- @"Mac Help for details.",
- @"OK",
- @"Don't show this warning again",
- NULL);
- if ( i == 0 ) { // Don't show again
- [[NSUserDefaults standardUserDefaults]
- setObject:@"YES" forKey:@"SkipFileBindingTest"];
- }
- return;
- }
- }
-}
-
-@end
diff --git a/Mac/OSX/PythonLauncher/MyDocument.h b/Mac/OSX/PythonLauncher/MyDocument.h
deleted file mode 100755
index 00c1bae..0000000
--- a/Mac/OSX/PythonLauncher/MyDocument.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// MyDocument.h
-// PythonLauncher
-//
-// Created by Jack Jansen on Fri Jul 19 2002.
-// Copyright (c) 2002 __MyCompanyName__. All rights reserved.
-//
-
-
-#import <Cocoa/Cocoa.h>
-
-#import "FileSettings.h"
-
-@interface MyDocument : NSDocument <FileSettingsSource>
-{
- IBOutlet NSTextField *interpreter;
- IBOutlet NSButton *honourhashbang;
- IBOutlet NSButton *debug;
- IBOutlet NSButton *verbose;
- IBOutlet NSButton *inspect;
- IBOutlet NSButton *optimize;
- IBOutlet NSButton *nosite;
- IBOutlet NSButton *tabs;
- IBOutlet NSTextField *others;
- IBOutlet NSButton *with_terminal;
- IBOutlet NSTextField *scriptargs;
- IBOutlet NSTextField *commandline;
-
- NSString *script;
- NSString *filetype;
- FileSettings *settings;
-}
-
-- (IBAction)do_run:(id)sender;
-- (IBAction)do_cancel:(id)sender;
-- (IBAction)do_reset:(id)sender;
-- (IBAction)do_apply:(id)sender;
-
-- (void)controlTextDidChange:(NSNotification *)aNotification;
-
-@end
diff --git a/Mac/OSX/PythonLauncher/MyDocument.m b/Mac/OSX/PythonLauncher/MyDocument.m
deleted file mode 100755
index 5acc2dc..0000000
--- a/Mac/OSX/PythonLauncher/MyDocument.m
+++ /dev/null
@@ -1,175 +0,0 @@
-//
-// MyDocument.m
-// PythonLauncher
-//
-// Created by Jack Jansen on Fri Jul 19 2002.
-// Copyright (c) 2002 __MyCompanyName__. All rights reserved.
-//
-
-#import "MyDocument.h"
-#import "MyAppDelegate.h"
-#import "doscript.h"
-
-@implementation MyDocument
-
-- (id)init
-{
- self = [super init];
- if (self) {
-
- // Add your subclass-specific initialization here.
- // If an error occurs here, send a [self dealloc] message and return nil.
- script = [@"<no script>.py" retain];
- filetype = [@"Python Script" retain];
- settings = NULL;
- }
- return self;
-}
-
-- (NSString *)windowNibName
-{
- // Override returning the nib file name of the document
- // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead.
- return @"MyDocument";
-}
-
-- (void)close
-{
- NSApplication *app = [NSApplication sharedApplication];
- [super close];
- if ([[app delegate] shouldTerminate])
- [app terminate: self];
-}
-
-- (void)load_defaults
-{
-// if (settings) [settings release];
- settings = [FileSettings newSettingsForFileType: filetype];
-}
-
-- (void)update_display
-{
-// [[self window] setTitle: script];
-
- [interpreter setStringValue: [settings interpreter]];
- [honourhashbang setState: [settings honourhashbang]];
- [debug setState: [settings debug]];
- [verbose setState: [settings verbose]];
- [inspect setState: [settings inspect]];
- [optimize setState: [settings optimize]];
- [nosite setState: [settings nosite]];
- [tabs setState: [settings tabs]];
- [others setStringValue: [settings others]];
- [scriptargs setStringValue: [settings scriptargs]];
- [with_terminal setState: [settings with_terminal]];
-
- [commandline setStringValue: [settings commandLineForScript: script]];
-}
-
-- (void)update_settings
-{
- [settings updateFromSource: self];
-}
-
-- (BOOL)run
-{
- const char *cmdline;
- int sts;
-
- cmdline = [[settings commandLineForScript: script] cString];
- if ([settings with_terminal]) {
- sts = doscript(cmdline);
- } else {
- sts = system(cmdline);
- }
- if (sts) {
- NSLog(@"Exit status: %d\n", sts);
- return NO;
- }
- return YES;
-}
-
-- (void)windowControllerDidLoadNib:(NSWindowController *) aController
-{
- [super windowControllerDidLoadNib:aController];
- // Add any code here that need to be executed once the windowController has loaded the document's window.
- [self load_defaults];
- [self update_display];
-}
-
-- (NSData *)dataRepresentationOfType:(NSString *)aType
-{
- // Insert code here to write your document from the given data. You can also choose to override -fileWrapperRepresentationOfType: or -writeToFile:ofType: instead.
- return nil;
-}
-
-- (BOOL)readFromFile:(NSString *)fileName ofType:(NSString *)type;
-{
- // Insert code here to read your document from the given data. You can also choose to override -loadFileWrapperRepresentation:ofType: or -readFromFile:ofType: instead.
- BOOL show_ui;
-
- // ask the app delegate whether we should show the UI or not.
- show_ui = [[[NSApplication sharedApplication] delegate] shouldShowUI];
- [script release];
- script = [fileName retain];
- [filetype release];
- filetype = [type retain];
-// if (settings) [settings release];
- settings = [FileSettings newSettingsForFileType: filetype];
- if (show_ui) {
- [self update_display];
- return YES;
- } else {
- [self run];
- [self close];
- return NO;
- }
-}
-
-- (IBAction)do_run:(id)sender
-{
- [self update_settings];
- [self update_display];
- if ([self run])
- [self close];
-}
-
-- (IBAction)do_cancel:(id)sender
-{
- [self close];
-}
-
-
-- (IBAction)do_reset:(id)sender
-{
- [settings reset];
- [self update_display];
-}
-
-- (IBAction)do_apply:(id)sender
-{
- [self update_settings];
- [self update_display];
-}
-
-// FileSettingsSource protocol
-- (NSString *) interpreter { return [interpreter stringValue];};
-- (BOOL) honourhashbang { return [honourhashbang state];};
-- (BOOL) debug { return [debug state];};
-- (BOOL) verbose { return [verbose state];};
-- (BOOL) inspect { return [inspect state];};
-- (BOOL) optimize { return [optimize state];};
-- (BOOL) nosite { return [nosite state];};
-- (BOOL) tabs { return [tabs state];};
-- (NSString *) others { return [others stringValue];};
-- (NSString *) scriptargs { return [scriptargs stringValue];};
-- (BOOL) with_terminal { return [with_terminal state];};
-
-// Delegates
-- (void)controlTextDidChange:(NSNotification *)aNotification
-{
- [self update_settings];
- [self update_display];
-};
-
-@end
diff --git a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/classes.nib b/Mac/OSX/PythonLauncher/PreferenceWindow.nib/classes.nib
deleted file mode 100644
index 467aa8b..0000000
--- a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/classes.nib
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- IBClasses = (
- {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
- {
- ACTIONS = {"do_apply" = id; "do_filetype" = id; "do_reset" = id; };
- CLASS = PreferencesWindowController;
- LANGUAGE = ObjC;
- OUTLETS = {
- commandline = NSTextField;
- debug = NSButton;
- filetype = NSPopUpButton;
- honourhashbang = NSButton;
- inspect = NSButton;
- interpreter = NSTextField;
- nosite = NSButton;
- optimize = NSButton;
- others = NSTextField;
- tabs = NSButton;
- verbose = NSButton;
- "with_terminal" = NSButton;
- };
- SUPERCLASS = NSWindowController;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/info.nib b/Mac/OSX/PythonLauncher/PreferenceWindow.nib/info.nib
deleted file mode 100644
index bc558f7..0000000
--- a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/info.nib
+++ /dev/null
@@ -1,16 +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>IBDocumentLocation</key>
- <string>565 235 519 534 0 0 1280 1002 </string>
- <key>IBFramework Version</key>
- <string>364.0</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>5</integer>
- </array>
- <key>IBSystem Version</key>
- <string>7H63</string>
-</dict>
-</plist>
diff --git a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/objects.nib b/Mac/OSX/PythonLauncher/PreferenceWindow.nib/objects.nib
deleted file mode 100644
index 3dfed33..0000000
--- a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/Mac/OSX/PythonLauncher/PreferencesWindowController.h b/Mac/OSX/PythonLauncher/PreferencesWindowController.h
deleted file mode 100644
index 6346996..0000000
--- a/Mac/OSX/PythonLauncher/PreferencesWindowController.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* PreferencesWindowController */
-
-#import <Cocoa/Cocoa.h>
-
-#import "FileSettings.h"
-
-@interface PreferencesWindowController : NSWindowController <FileSettingsSource>
-{
- IBOutlet NSPopUpButton *filetype;
- IBOutlet NSComboBox *interpreter;
- IBOutlet NSButton *honourhashbang;
- IBOutlet NSButton *debug;
- IBOutlet NSButton *verbose;
- IBOutlet NSButton *inspect;
- IBOutlet NSButton *optimize;
- IBOutlet NSButton *nosite;
- IBOutlet NSButton *tabs;
- IBOutlet NSTextField *others;
- IBOutlet NSButton *with_terminal;
- IBOutlet NSTextField *commandline;
-
- FileSettings *settings;
-}
-
-+ getPreferencesWindow;
-
-- (IBAction)do_reset:(id)sender;
-- (IBAction)do_apply:(id)sender;
-- (IBAction)do_filetype:(id)sender;
-
-- (void)controlTextDidChange:(NSNotification *)aNotification;
-
-- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString;
-- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index;
-- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox;
-
-
-@end
diff --git a/Mac/OSX/PythonLauncher/PreferencesWindowController.m b/Mac/OSX/PythonLauncher/PreferencesWindowController.m
deleted file mode 100644
index 311c375..0000000
--- a/Mac/OSX/PythonLauncher/PreferencesWindowController.m
+++ /dev/null
@@ -1,121 +0,0 @@
-#import "PreferencesWindowController.h"
-
-@implementation PreferencesWindowController
-
-+ getPreferencesWindow
-{
- static PreferencesWindowController *_singleton;
-
- if (!_singleton)
- _singleton = [[PreferencesWindowController alloc] init];
- [_singleton showWindow: _singleton];
- return _singleton;
-}
-
-- (id) init
-{
- self = [self initWithWindowNibName: @"PreferenceWindow"];
- return self;
-}
-
-- (void)load_defaults
-{
- NSString *title = [filetype titleOfSelectedItem];
-
- settings = [FileSettings getDefaultsForFileType: title];
-}
-
-- (void)update_display
-{
-// [[self window] setTitle: script];
-
- [interpreter reloadData];
- [interpreter setStringValue: [settings interpreter]];
- [honourhashbang setState: [settings honourhashbang]];
- [debug setState: [settings debug]];
- [verbose setState: [settings verbose]];
- [inspect setState: [settings inspect]];
- [optimize setState: [settings optimize]];
- [nosite setState: [settings nosite]];
- [tabs setState: [settings tabs]];
- [others setStringValue: [settings others]];
- [with_terminal setState: [settings with_terminal]];
- // Not scriptargs, it isn't for preferences
-
- [commandline setStringValue: [settings commandLineForScript: @"<your script here>"]];
-}
-
-- (void) windowDidLoad
-{
- [super windowDidLoad];
- [self load_defaults];
- [self update_display];
-}
-
-- (void)update_settings
-{
- [settings updateFromSource: self];
-}
-
-- (IBAction)do_filetype:(id)sender
-{
- [self load_defaults];
- [self update_display];
-}
-
-- (IBAction)do_reset:(id)sender
-{
- [settings reset];
- [self update_display];
-}
-
-- (IBAction)do_apply:(id)sender
-{
- [self update_settings];
- [self update_display];
-}
-
-// FileSettingsSource protocol
-- (NSString *) interpreter { return [interpreter stringValue];};
-- (BOOL) honourhashbang { return [honourhashbang state]; };
-- (BOOL) debug { return [debug state];};
-- (BOOL) verbose { return [verbose state];};
-- (BOOL) inspect { return [inspect state];};
-- (BOOL) optimize { return [optimize state];};
-- (BOOL) nosite { return [nosite state];};
-- (BOOL) tabs { return [tabs state];};
-- (NSString *) others { return [others stringValue];};
-- (BOOL) with_terminal { return [with_terminal state];};
-- (NSString *) scriptargs { return @"";};
-
-// Delegates
-- (void)controlTextDidChange:(NSNotification *)aNotification
-{
- [self update_settings];
- [self update_display];
-};
-
-// NSComboBoxDataSource protocol
-- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString
-{
- NSArray *interp_list = [settings interpreters];
- unsigned int rv = [interp_list indexOfObjectIdenticalTo: aString];
- return rv;
-}
-
-- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index
-{
- NSArray *interp_list = [settings interpreters];
- id rv = [interp_list objectAtIndex: index];
- return rv;
-}
-
-- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox
-{
- NSArray *interp_list = [settings interpreters];
- int rv = [interp_list count];
- return rv;
-}
-
-
-@end
diff --git a/Mac/OSX/PythonLauncher/doscript.h b/Mac/OSX/PythonLauncher/doscript.h
deleted file mode 100644
index eef0b56..0000000
--- a/Mac/OSX/PythonLauncher/doscript.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * doscript.h
- * PythonLauncher
- *
- * Created by Jack Jansen on Wed Jul 31 2002.
- * Copyright (c) 2002 __MyCompanyName__. All rights reserved.
- *
- */
-
-#include <Carbon/Carbon.h>
-
-extern int doscript(const char *command); \ No newline at end of file
diff --git a/Mac/OSX/PythonLauncher/doscript.m b/Mac/OSX/PythonLauncher/doscript.m
deleted file mode 100644
index 3e4e223..0000000
--- a/Mac/OSX/PythonLauncher/doscript.m
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * doscript.c
- * PythonLauncher
- *
- * Created by Jack Jansen on Wed Jul 31 2002.
- * Copyright (c) 2002 __MyCompanyName__. All rights reserved.
- *
- */
-
-#import <Cocoa/Cocoa.h>
-#import <ApplicationServices/ApplicationServices.h>
-#import "doscript.h"
-
-/* I assume I could pick these up from somewhere, but where... */
-#define CREATOR 'trmx'
-
-#define ACTIVATE_CMD 'misc'
-#define ACTIVATE_SUITE 'actv'
-
-#define DOSCRIPT_CMD 'dosc'
-#define DOSCRIPT_SUITE 'core'
-#define WITHCOMMAND 'cmnd'
-
-/* ... and there's probably also a better way to do this... */
-#define START_TERMINAL "/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal &"
-
-extern int
-doscript(const char *command)
-{
- OSErr err;
- AppleEvent theAEvent, theReply;
- AEAddressDesc terminalAddress;
- AEDesc commandDesc;
- OSType terminalCreator = CREATOR;
-
- /* set up locals */
- AECreateDesc(typeNull, NULL, 0, &theAEvent);
- AECreateDesc(typeNull, NULL, 0, &terminalAddress);
- AECreateDesc(typeNull, NULL, 0, &theReply);
- AECreateDesc(typeNull, NULL, 0, &commandDesc);
-
- /* create the "activate" event for Terminal */
- err = AECreateDesc(typeApplSignature, (Ptr) &terminalCreator,
- sizeof(terminalCreator), &terminalAddress);
- if (err != noErr) {
- NSLog(@"doscript: AECreateDesc: error %d\n", err);
- goto bail;
- }
- err = AECreateAppleEvent(ACTIVATE_SUITE, ACTIVATE_CMD,
- &terminalAddress, kAutoGenerateReturnID,
- kAnyTransactionID, &theAEvent);
-
- if (err != noErr) {
- NSLog(@"doscript: AECreateAppleEvent(activate): error %d\n", err);
- goto bail;
- }
- /* send the event */
- err = AESend(&theAEvent, &theReply, kAEWaitReply,
- kAENormalPriority, kAEDefaultTimeout, NULL, NULL);
- if ( err == -600 ) {
- int count=10;
- /* If it failed with "no such process" try to start Terminal */
- err = system(START_TERMINAL);
- if ( err ) {
- NSLog(@"doscript: system(): %s\n", strerror(errno));
- goto bail;
- }
- do {
- sleep(1);
- /* send the event again */
- err = AESend(&theAEvent, &theReply, kAEWaitReply,
- kAENormalPriority, kAEDefaultTimeout, NULL, NULL);
- } while (err == -600 && --count > 0);
- if ( err == -600 )
- NSLog(@"doscript: Could not activate Terminal\n");
- }
- if (err != noErr) {
- NSLog(@"doscript: AESend(activate): error %d\n", err);
- goto bail;
- }
-
- /* create the "doscript with command" event for Terminal */
- err = AECreateAppleEvent(DOSCRIPT_SUITE, DOSCRIPT_CMD,
- &terminalAddress, kAutoGenerateReturnID,
- kAnyTransactionID, &theAEvent);
- if (err != noErr) {
- NSLog(@"doscript: AECreateAppleEvent(doscript): error %d\n", err);
- goto bail;
- }
-
- /* add the command to the apple event */
- err = AECreateDesc(typeChar, command, strlen(command), &commandDesc);
- if (err != noErr) {
- NSLog(@"doscript: AECreateDesc(command): error %d\n", err);
- goto bail;
- }
- err = AEPutParamDesc(&theAEvent, WITHCOMMAND, &commandDesc);
- if (err != noErr) {
- NSLog(@"doscript: AEPutParamDesc: error %d\n", err);
- goto bail;
- }
-
- /* send the command event to Terminal.app */
- err = AESend(&theAEvent, &theReply, kAEWaitReply,
- kAENormalPriority, kAEDefaultTimeout, NULL, NULL);
-
- if (err != noErr) {
- NSLog(@"doscript: AESend(docommand): error %d\n", err);
- goto bail;
- }
- /* clean up and leave */
-bail:
- AEDisposeDesc(&commandDesc);
- AEDisposeDesc(&theAEvent);
- AEDisposeDesc(&terminalAddress);
- AEDisposeDesc(&theReply);
- return err;
-}
diff --git a/Mac/OSX/PythonLauncher/factorySettings.plist b/Mac/OSX/PythonLauncher/factorySettings.plist
deleted file mode 100644
index 1202421..0000000
--- a/Mac/OSX/PythonLauncher/factorySettings.plist
+++ /dev/null
@@ -1,87 +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>Python GUI Script</key>
- <dict>
- <key>debug</key>
- <false/>
- <key>inspect</key>
- <false/>
- <key>interpreter_list</key>
- <array>
- <string>/usr/local/bin/pythonw</string>
- <string>/usr/bin/pythonw</string>
- <string>/sw/bin/pythonw</string>
- </array>
- <key>honourhashbang</key>
- <false/>
- <key>nosite</key>
- <false/>
- <key>optimize</key>
- <false/>
- <key>others</key>
- <string></string>
- <key>verbose</key>
- <false/>
- <key>with_terminal</key>
- <false/>
- </dict>
- <key>Python Script</key>
- <dict>
- <key>debug</key>
- <false/>
- <key>inspect</key>
- <false/>
- <key>interpreter_list</key>
- <array>
- <string>/usr/local/bin/pythonw</string>
- <string>/usr/local/bin/python</string>
- <string>/usr/bin/pythonw</string>
- <string>/usr/bin/python</string>
- <string>/sw/bin/pythonw</string>
- <string>/sw/bin/python</string>
- </array>
- <key>honourhashbang</key>
- <false/>
- <key>nosite</key>
- <false/>
- <key>optimize</key>
- <false/>
- <key>others</key>
- <string></string>
- <key>verbose</key>
- <false/>
- <key>with_terminal</key>
- <true/>
- </dict>
- <key>Python Bytecode Document</key>
- <dict>
- <key>debug</key>
- <false/>
- <key>inspect</key>
- <false/>
- <key>interpreter_list</key>
- <array>
- <string>/usr/local/bin/pythonw</string>
- <string>/usr/local/bin/python</string>
- <string>/usr/bin/pythonw</string>
- <string>/usr/bin/python</string>
- <string>/sw/bin/pythonw</string>
- <string>/sw/bin/python</string>
- </array>
- <key>honourhashbang</key>
- <false/>
- <key>nosite</key>
- <false/>
- <key>optimize</key>
- <false/>
- <key>others</key>
- <string></string>
- <key>verbose</key>
- <false/>
- <key>with_terminal</key>
- <true/>
- </dict>
-</dict>
-</plist>
diff --git a/Mac/OSX/PythonLauncher/main.m b/Mac/OSX/PythonLauncher/main.m
deleted file mode 100755
index 6841433..0000000
--- a/Mac/OSX/PythonLauncher/main.m
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// main.m
-// PythonLauncher
-//
-// Created by Jack Jansen on Fri Jul 19 2002.
-// Copyright (c) 2002 __MyCompanyName__. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-#include <unistd.h>
-
-int main(int argc, const char *argv[])
-{
- char *home = getenv("HOME");
- if (home) chdir(home);
- return NSApplicationMain(argc, argv);
-}
diff --git a/Mac/OSX/Tools/pythonw.c b/Mac/OSX/Tools/pythonw.c
deleted file mode 100644
index e70a76f..0000000
--- a/Mac/OSX/Tools/pythonw.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * This wrapper program executes a python executable hidden inside an
- * application bundle inside the Python framework. This is needed to run
- * GUI code: some GUI API's don't work unless the program is inside an
- * application bundle.
- */
-#include <unistd.h>
-#include <err.h>
-
-static char Python[] = PYTHONWEXECUTABLE;
-
-int main(int argc, char **argv) {
- argv[0] = Python;
- execv(Python, argv);
- err(1, "execv: %s", Python);
- /* NOTREACHED */
-}
diff --git a/Mac/OSX/fixapplepython23.py b/Mac/OSX/fixapplepython23.py
deleted file mode 100644
index 181181e..0000000
--- a/Mac/OSX/fixapplepython23.py
+++ /dev/null
@@ -1,118 +0,0 @@
-"""fixapplepython23 - Fix Apple-installed Python 2.3 (on Mac OS X 10.3)
-
-Python 2.3 (and 2.3.X for X<5) have the problem that building an extension
-for a framework installation may accidentally pick up the framework
-of a newer Python, in stead of the one that was used to build the extension.
-
-This script modifies the Makefile (in .../lib/python2.3/config) to use
-the newer method of linking extensions with "-undefined dynamic_lookup"
-which fixes this problem.
-
-The script will first check all prerequisites, and return a zero exit
-status also when nothing needs to be fixed.
-"""
-import sys
-import os
-import gestalt
-
-MAKEFILE='/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/Makefile'
-CHANGES=((
- 'LDSHARED=\t$(CC) $(LDFLAGS) -bundle -framework $(PYTHONFRAMEWORK)\n',
- 'LDSHARED=\t$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup\n'
- ),(
- 'BLDSHARED=\t$(CC) $(LDFLAGS) -bundle -framework $(PYTHONFRAMEWORK)\n',
- 'BLDSHARED=\t$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup\n'
- ),(
- 'CC=\t\tgcc\n',
- 'CC=\t\t/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/PantherPythonFix/run-gcc\n'
- ),(
- 'CXX=\t\tc++\n',
- 'CXX=\t\t/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/PantherPythonFix/run-g++\n'
-))
-
-GCC_SCRIPT='/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/PantherPythonFix/run-gcc'
-GXX_SCRIPT='/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/PantherPythonFix/run-g++'
-SCRIPT="""#!/bin/sh
-export MACOSX_DEPLOYMENT_TARGET=10.3
-exec %s "${@}"
-"""
-
-def findline(lines, start):
- """return line starting with given string or -1"""
- for i in range(len(lines)):
- if lines[i][:len(start)] == start:
- return i
- return -1
-
-def fix(makefile, do_apply):
- """Fix the Makefile, if required."""
- fixed = False
- lines = open(makefile).readlines()
-
- for old, new in CHANGES:
- i = findline(lines, new)
- if i >= 0:
- # Already fixed
- continue
- i = findline(lines, old)
- if i < 0:
- print 'fixapplepython23: Python installation not fixed (appears broken)'
- print 'fixapplepython23: missing line:', old
- return 2
- lines[i] = new
- fixed = True
-
- if fixed:
- if do_apply:
- print 'fixapplepython23: Fix to Apple-installed Python 2.3 applied'
- os.rename(makefile, makefile + '~')
- open(makefile, 'w').writelines(lines)
- return 0
- else:
- print 'fixapplepython23: Fix to Apple-installed Python 2.3 should be applied'
- return 1
- else:
- print 'fixapplepython23: No fix needed, appears to have been applied before'
- return 0
-
-def makescript(filename, compiler):
- """Create a wrapper script for a compiler"""
- dirname = os.path.split(filename)[0]
- if not os.access(dirname, os.X_OK):
- os.mkdir(dirname, 0755)
- fp = open(filename, 'w')
- fp.write(SCRIPT % compiler)
- fp.close()
- os.chmod(filename, 0755)
- print 'fixapplepython23: Created', filename
-
-def main():
- # Check for -n option
- if len(sys.argv) > 1 and sys.argv[1] == '-n':
- do_apply = False
- else:
- do_apply = True
- # First check OS version
- if gestalt.gestalt('sysv') < 0x1030:
- print 'fixapplepython23: no fix needed on MacOSX < 10.3'
- sys.exit(0)
- # Test that a framework Python is indeed installed
- if not os.path.exists(MAKEFILE):
- print 'fixapplepython23: Python framework does not appear to be installed (?), nothing fixed'
- sys.exit(0)
- # Check that we can actually write the file
- if do_apply and not os.access(MAKEFILE, os.W_OK):
- print 'fixapplepython23: No write permission, please run with "sudo"'
- sys.exit(2)
- # Create the shell scripts
- if do_apply:
- if not os.access(GCC_SCRIPT, os.X_OK):
- makescript(GCC_SCRIPT, "gcc")
- if not os.access(GXX_SCRIPT, os.X_OK):
- makescript(GXX_SCRIPT, "g++")
- # Finally fix the makefile
- rv = fix(MAKEFILE, do_apply)
- sys.exit(rv)
-
-if __name__ == '__main__':
- main()
diff --git a/Mac/OSX/README b/Mac/README
index 1e58b02..1e58b02 100644
--- a/Mac/OSX/README
+++ b/Mac/README
diff --git a/Mac/OSXResources/app/Info.plist b/Mac/Resources/app/Info.plist
index 387bbed..387bbed 100644
--- a/Mac/OSXResources/app/Info.plist
+++ b/Mac/Resources/app/Info.plist
diff --git a/Mac/OSXResources/app/PkgInfo b/Mac/Resources/app/PkgInfo
index 67c491a..67c491a 100644
--- a/Mac/OSXResources/app/PkgInfo
+++ b/Mac/Resources/app/PkgInfo
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/PackageManager.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif
index 2b93dc8..2b93dc8 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/PackageManager.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/community.html b/Mac/Resources/app/Resources/English.lproj/Documentation/community.html
index 140a38b..140a38b 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/community.html
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/community.html
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/doc/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html
index 2ce7357..2ce7357 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/doc/index.html
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/finder.html b/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html
index a8877ba..a8877ba 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/finder.html
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/gui.html b/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html
index 252c78c..252c78c 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/gui.html
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/IDE.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/IDE.gif
index da9325d..da9325d 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/IDE.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/IDE.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif
index baa400e..baa400e 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/hello_world.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/hello_world.gif
index c7390af..c7390af 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/hello_world.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/hello_world.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/index.html
index a169f5e..a169f5e 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/index.html
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/index.html
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif
index e7cca3d..e7cca3d 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif
index d2022c8..d2022c8 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif
index 7268a84..7268a84 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif
index dd6cca3..dd6cca3 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/output_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/output_window.gif
index 568dcb5..568dcb5 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/output_window.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/output_window.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif
index 6e5c926..6e5c926 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif
index 1dba570..1dba570 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif
index 2e95b87..2e95b87 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/index.html
index ef12c10..ef12c10 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/index.html
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html b/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html
index f0ab371..f0ab371 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/packman.html b/Mac/Resources/app/Resources/English.lproj/Documentation/packman.html
index 355e0da..355e0da 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/packman.html
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/packman.html
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/python.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif
index 3d4aa5d..3d4aa5d 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/python.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/pythonsmall.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif
index 440225e..440225e 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/pythonsmall.gif
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html b/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html
index 16321cb..16321cb 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/shell.html b/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html
index 56f5646..56f5646 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/shell.html
+++ b/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html
diff --git a/Mac/OSXResources/app/Resources/English.lproj/InfoPlist.strings b/Mac/Resources/app/Resources/English.lproj/InfoPlist.strings
index f8a8bc1..f8a8bc1 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/InfoPlist.strings
+++ b/Mac/Resources/app/Resources/English.lproj/InfoPlist.strings
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/PythonApplet.icns b/Mac/Resources/app/Resources/PythonApplet.icns
index c8aad9f..c8aad9f 100644
--- a/Mac/OSXResources/app/Resources/PythonApplet.icns
+++ b/Mac/Resources/app/Resources/PythonApplet.icns
Binary files differ
diff --git a/Mac/OSXResources/app/Resources/PythonInterpreter.icns b/Mac/Resources/app/Resources/PythonInterpreter.icns
index e09fd38..e09fd38 100644
--- a/Mac/OSXResources/app/Resources/PythonInterpreter.icns
+++ b/Mac/Resources/app/Resources/PythonInterpreter.icns
Binary files differ
diff --git a/Mac/OSXResources/framework/English.lproj/InfoPlist.strings b/Mac/Resources/framework/English.lproj/InfoPlist.strings
index cc24bfc..cc24bfc 100644
--- a/Mac/OSXResources/framework/English.lproj/InfoPlist.strings
+++ b/Mac/Resources/framework/English.lproj/InfoPlist.strings
Binary files differ
diff --git a/Mac/OSXResources/framework/Info.plist b/Mac/Resources/framework/Info.plist
index 302ff48..302ff48 100644
--- a/Mac/OSXResources/framework/Info.plist
+++ b/Mac/Resources/framework/Info.plist
diff --git a/Mac/OSXResources/framework/version.plist b/Mac/Resources/framework/version.plist
index 7527442..7527442 100644
--- a/Mac/OSXResources/framework/version.plist
+++ b/Mac/Resources/framework/version.plist
diff --git a/Mac/OSXResources/iconsrc/IDE.psd b/Mac/Resources/iconsrc/IDE.psd
index b9637b9..b9637b9 100644
--- a/Mac/OSXResources/iconsrc/IDE.psd
+++ b/Mac/Resources/iconsrc/IDE.psd
Binary files differ
diff --git a/Mac/OSXResources/iconsrc/PackageManager.psd b/Mac/Resources/iconsrc/PackageManager.psd
index 42f41b1..42f41b1 100644
--- a/Mac/OSXResources/iconsrc/PackageManager.psd
+++ b/Mac/Resources/iconsrc/PackageManager.psd
Binary files differ
diff --git a/Mac/OSXResources/iconsrc/PythonApplet.psd b/Mac/Resources/iconsrc/PythonApplet.psd
index 7458b52..7458b52 100644
--- a/Mac/OSXResources/iconsrc/PythonApplet.psd
+++ b/Mac/Resources/iconsrc/PythonApplet.psd
Binary files differ
diff --git a/Mac/OSXResources/iconsrc/PythonCompiled.psd b/Mac/Resources/iconsrc/PythonCompiled.psd
index 61fc4d1..61fc4d1 100755
--- a/Mac/OSXResources/iconsrc/PythonCompiled.psd
+++ b/Mac/Resources/iconsrc/PythonCompiled.psd
Binary files differ
diff --git a/Mac/OSXResources/iconsrc/PythonIcon.psd b/Mac/Resources/iconsrc/PythonIcon.psd
index d818dc6..d818dc6 100755
--- a/Mac/OSXResources/iconsrc/PythonIcon.psd
+++ b/Mac/Resources/iconsrc/PythonIcon.psd
Binary files differ
diff --git a/Mac/OSXResources/iconsrc/PythonSource.psd b/Mac/Resources/iconsrc/PythonSource.psd
index eba8f28..eba8f28 100755
--- a/Mac/OSXResources/iconsrc/PythonSource.psd
+++ b/Mac/Resources/iconsrc/PythonSource.psd
Binary files differ
diff --git a/Mac/OSXResources/iconsrc/PythonWSource.psd b/Mac/Resources/iconsrc/PythonWSource.psd
index 2b84d94..2b84d94 100644
--- a/Mac/OSXResources/iconsrc/PythonWSource.psd
+++ b/Mac/Resources/iconsrc/PythonWSource.psd
Binary files differ