summaryrefslogtreecommitdiff
path: root/Mac
diff options
context:
space:
mode:
Diffstat (limited to 'Mac')
-rw-r--r--Mac/BuildScript/README.txt157
-rwxr-xr-xMac/BuildScript/build-installer.py158
-rw-r--r--Mac/BuildScript/resources/ReadMe.txt48
-rw-r--r--Mac/BuildScript/resources/Welcome.rtf33
-rwxr-xr-xMac/BuildScript/scripts/postflight.documentation31
-rwxr-xr-xMac/BuildScript/scripts/postflight.patch-profile9
-rw-r--r--Mac/Demo/html.icons/modulator.gifbin6479 -> 0 bytes
-rw-r--r--Mac/IDLE/Info.plist.in11
-rw-r--r--Mac/IDLE/Makefile.in11
-rw-r--r--Mac/IDLE/config-extensions.def5
-rw-r--r--Mac/IDLE/idlemain.py4
-rw-r--r--Mac/Makefile.in90
-rw-r--r--Mac/Modules/ColorPickermodule.c2
-rw-r--r--Mac/Modules/MacOS.c11
-rw-r--r--Mac/Modules/Nav.c9
-rw-r--r--Mac/Modules/OSATerminology.c42
-rwxr-xr-xMac/Modules/carbonevt/_CarbonEvtmodule.c12
-rw-r--r--Mac/Modules/ctl/_Ctlmodule.c2
-rw-r--r--Mac/Modules/icgluemodule.c2
-rw-r--r--Mac/Modules/snd/_Sndmodule.c2
-rwxr-xr-xMac/PythonLauncher/FileSettings.m4
-rw-r--r--Mac/PythonLauncher/Info.plist.in2
-rw-r--r--Mac/PythonLauncher/Makefile.in2
-rw-r--r--Mac/README59
-rw-r--r--Mac/Resources/app/Info.plist.in6
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gifbin6087 -> 0 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/community.html69
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html21
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/finder.html36
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/gui.html54
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/index.html48
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/intro.html76
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/packman.html64
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/python.gifbin6389 -> 0 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gifbin138 -> 0 bytes
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html53
-rw-r--r--Mac/Resources/app/Resources/English.lproj/Documentation/shell.html52
-rw-r--r--Mac/Resources/framework/Info.plist.in4
-rw-r--r--Mac/Resources/iconsrc/IDE.psdbin83876 -> 0 bytes
-rw-r--r--Mac/Resources/iconsrc/PackageManager.psdbin71056 -> 0 bytes
-rw-r--r--Mac/Resources/iconsrc/PythonApplet.psdbin41543 -> 0 bytes
-rwxr-xr-xMac/Resources/iconsrc/PythonCompiled.psdbin76118 -> 0 bytes
-rwxr-xr-xMac/Resources/iconsrc/PythonIcon.psdbin67236 -> 0 bytes
-rwxr-xr-xMac/Resources/iconsrc/PythonSource.psdbin62075 -> 0 bytes
-rw-r--r--Mac/Resources/iconsrc/PythonWSource.psdbin64185 -> 0 bytes
-rw-r--r--Mac/Tools/Doc/HelpIndexingTool/Help_Indexing_Tool_Suite.py110
-rw-r--r--Mac/Tools/Doc/HelpIndexingTool/Miscellaneous_Standards.py49
-rw-r--r--Mac/Tools/Doc/HelpIndexingTool/Required_Suite.py32
-rw-r--r--Mac/Tools/Doc/HelpIndexingTool/Standard_Suite.py343
-rw-r--r--Mac/Tools/Doc/HelpIndexingTool/__init__.py78
-rw-r--r--Mac/Tools/Doc/HelpIndexingTool/odds_and_ends.py49
-rw-r--r--Mac/Tools/Doc/README35
-rw-r--r--Mac/Tools/Doc/setup.py214
-rw-r--r--Mac/Tools/fixapplepython23.py2
-rw-r--r--Mac/Tools/pythonw.c173
-rw-r--r--Mac/scripts/BuildApplet.py3
-rw-r--r--Mac/scripts/zappycfiles.py13
57 files changed, 626 insertions, 1664 deletions
diff --git a/Mac/BuildScript/README.txt b/Mac/BuildScript/README.txt
index 0f1aeb5d2a..de2f5cb359 100644
--- a/Mac/BuildScript/README.txt
+++ b/Mac/BuildScript/README.txt
@@ -1,78 +1,147 @@
-Building a MacPython distribution
-=================================
+Building a Python Mac OS X distribution
+=======================================
-The ``build-install.py`` script creates MacPython distributions, including
-sleepycat db4, sqlite3 and readline support. It builds a complete
+The ``build-install.py`` script creates Python distributions, including
+certain third-party libraries as necessary. 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.
-Prerequisites
--------------
+As of Python 2.7.x and 3.2, PSF practice is to build two installer variants
+for each release:
-* A MacOS X 10.4 (or later)
+1. 32-bit-only, i386 and PPC universal, capable on running on all machines
+ supported by Mac OS X 10.3.9 through (at least) 10.6::
-* XCode 2.2 (or later), with the universal SDK
+ python build-installer.py \
+ --sdk-path=/Developer/SDKs/MacOSX10.4u.sdk \
+ --universal-archs=32-bit \
+ --dep-target=10.3
+ # These are the current default options
-* No Fink (in ``/sw``) or DarwinPorts (in ``/opt/local``), those could
+ - builds the following third-party libraries
+
+ * Bzip2
+ * Zlib 1.2.3
+ * GNU Readline (GPL)
+ * SQLite 3
+ * NCurses
+ * Oracle Sleepycat DB 4.8 (Python 2.x only)
+
+ - requires ActiveState ``Tcl/Tk 8.4`` (currently 8.4.19) to be installed for building
+
+ - current target build environment:
+
+ * Mac OS X 10.5.8 PPC or Intel
+ * Xcode 3.1.4 (or later)
+ * ``MacOSX10.4u`` SDK (later SDKs do not support PPC G3 processors)
+ * ``MACOSX_DEPLOYMENT_TARGET=10.3``
+ * Apple ``gcc-4.0``
+ * Python 2.n (n >= 4) for documentation build with Sphinx
+
+ - alternate build environments:
+
+ * Mac OS X 10.4.11 with Xcode 2.5
+ * Mac OS X 10.6.6 with Xcode 3.2.5
+ - need to change ``/System/Library/Frameworks/{Tcl,Tk}.framework/Version/Current`` to ``8.4``
+
+2. 64-bit / 32-bit, x86_64 and i386 universal, for OS X 10.6 (and later)::
+
+ python build-installer.py \
+ --sdk-path=/Developer/SDKs/MacOSX10.6.sdk \
+ --universal-archs=intel \
+ --dep-target=10.6
+
+ - uses system-supplied versions of third-party libraries
+
+ * readline module links with Apple BSD editline (libedit)
+ * builds Oracle Sleepycat DB 4.8 (Python 2.x only)
+
+ - requires ActiveState Tcl/Tk 8.5.9 (or later) to be installed for building
+
+ - current target build environment:
+
+ * Mac OS X 10.6.6 (or later)
+ * Xcode 3.2.5 (or later)
+ * ``MacOSX10.6`` SDK
+ * ``MACOSX_DEPLOYMENT_TARGET=10.6``
+ * Apple ``gcc-4.2``
+ * Python 2.n (n >= 4) for documentation build with Sphinx
+
+ - alternate build environments:
+
+ * none
+
+
+General Prerequisites
+---------------------
+
+* No Fink (in ``/sw``) or MacPorts (in ``/opt/local``) or other local
+ libraries or utilities (in ``/usr/local``) as they could
interfere with the build.
-* The documentation for the release must be available on python.org
+* The documentation for the release is built using Sphinx
because it is included in the installer.
+* It is safest to start each variant build with an empty source directory
+ populated with a fresh copy of the untarred source.
+
The Recipe
----------
-Here are the steps you need to follow to build a MacPython installer:
+Here are the steps you need to follow to build a Python installer:
-* Run ``./build-installer.py``. Optionally you can pass a number of arguments
- to specify locations of various files. Please see the top of
+* 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.
- Running this script takes some time, I will not only build Python itself
+ Running this script takes some time, it will not only build Python itself
but also some 3th-party libraries that are needed for extensions.
* When done the script will tell you where the DMG image is (by default
somewhere in ``/tmp/_py``).
-Building a 4-way universal installer
-....................................
+Building other universal installers
+...................................
It is also possible to build a 4-way universal installer that runs on
-OSX Leopard or later::
+OS X Leopard or later::
- $ ./build-installer.py --dep-target=10.5 --universal-archs=all --sdk=/
+ python 2.6 /build-installer.py \
+ --dep-target=10.5
+ --universal-archs=all
+ --sdk-path=/Developer/SDKs/MacOSX10.5.sdk
-This requires that the deployment target is 10.5 (or later), and hence
-also that your building on at least OSX 10.5.
-
-Testing
--------
-
-The resulting binaries should work on MacOSX 10.3.9 or later. I usually run
-the installer on a 10.3.9, a 10.4.x PPC and a 10.4.x Intel system and then
-run the testsuite to make sure.
+This requires that the deployment target is 10.5, and hence
+also that you are building on at least OS X 10.5. 4-way includes
+``i386``, ``x86_64``, ``ppc``, and ``ppc64`` (G5). ``ppc64`` executable
+variants can only be run on G5 machines running 10.5. Note that,
+while OS X 10.6 is only supported on Intel-based machines, it is possible
+to run ``ppc`` (32-bit) executables unmodified thanks to the Rosetta ppc
+emulation in OS X 10.5 and 10.6.
+Other ``--universal-archs`` options are ``64-bit`` (``x86_64``, ``ppc64``),
+and ``3-way`` (``ppc``, ``i386``, ``x86_64``). None of these options
+are regularly exercised; use at your own risk.
-Announcements
--------------
-(This is mostly of historic interest)
+Testing
+-------
-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)
+Ideally, the resulting binaries should be installed and the test suite run
+on all supported OS X releases and architectures. As a practical matter,
+that is generally not possible. At a minimum, variant 1 should be run on
+at least one Intel, one PPC G4, and one PPC G3 system and one each of
+OS X 10.6, 10.5, 10.4, and 10.3.9. Not all tests run on 10.3.9.
+Variant 2 should be run on 10.6 in both 32-bit and 64-bit modes.::
+
+ arch -i386 /usr/local/bin/pythonn.n -m test.regrtest -w -u all
+ arch -X86_64 /usr/local/bin/pythonn.n -m test.regrtest -w -u all
+
+Certain tests will be skipped and some cause the interpreter to fail
+which will likely generate ``Python quit unexpectedly`` alert messages
+to be generated at several points during a test run. These can
+be ignored.
-Also, check out Stephan Deibels http://pythonology.org/market contact list
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 277bd6fd4b..ba920127c4 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -1,12 +1,14 @@
#!/usr/bin/python
"""
-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. 64-bit or four-way universal builds require at least OS X 10.5 and
-the 10.5 SDK.
+This script is used to build "official" universal installers on Mac OS X.
+It requires at least Mac OS X 10.4, Xcode 2.2 and the 10.4u SDK for
+32-bit builds. 64-bit or four-way universal builds require at least
+OS X 10.5 and the 10.5 SDK.
-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)
+Please ensure that this script keeps working with Python 2.5, to avoid
+bootstrap issues (/usr/bin/python is Python 2.5 on OSX 10.5). Sphinx,
+which is used to build the documentation, currently requires at least
+Python 2.4.
Usage: see USAGE variable in the script.
"""
@@ -40,16 +42,19 @@ def grepValue(fn, variable):
if ln.startswith(variable):
value = ln[len(variable):].strip()
return value[1:-1]
+ raise RuntimeError, "Cannot find variable %s" % variable[:-1]
def getVersion():
return grepValue(os.path.join(SRCDIR, 'configure'), 'PACKAGE_VERSION')
+def getVersionTuple():
+ return tuple([int(n) for n in getVersion().split('.')])
+
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)
@@ -95,7 +100,7 @@ UNIVERSALARCHS = '32-bit'
ARCHLIST = universal_opts_map[UNIVERSALARCHS]
-# Source directory (asume we're in Mac/BuildScript)
+# Source directory (assume we're in Mac/BuildScript)
SRCDIR = os.path.dirname(
os.path.dirname(
os.path.dirname(
@@ -114,6 +119,8 @@ target_cc_map = {
CC = target_cc_map[DEPTARGET]
+PYTHON_3 = getVersionTuple() >= (3, 0)
+
USAGE = textwrap.dedent("""\
Usage: build_python [options]
@@ -139,9 +146,9 @@ def library_recipes():
if DEPTARGET < '10.5':
result.extend([
dict(
- name="Bzip2 1.0.5",
- url="http://www.bzip.org/1.0.5/bzip2-1.0.5.tar.gz",
- checksum='3c15a0c8d1d3ee1c46a1634d00617b1a',
+ name="Bzip2 1.0.6",
+ url="http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz",
+ checksum='00b516f4704d4a7cb50a1d97e6e8e15b',
configure=None,
install='make install CC=%s PREFIX=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%(
CC,
@@ -164,29 +171,33 @@ def 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" ,
- checksum='7ee5a692db88b30ca48927a13fd60e46',
+ name="GNU Readline 6.1.2",
+ url="http://ftp.gnu.org/pub/gnu/readline/readline-6.1.tar.gz" ,
+ checksum='fc2f7e714fe792db1ce6ddc4c9fb4ef3',
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',
+ 'http://ftp.gnu.org/pub/gnu/readline/readline-6.1-patches/readline61-001',
+ 'http://ftp.gnu.org/pub/gnu/readline/readline-6.1-patches/readline61-002',
]
),
dict(
- name="SQLite 3.6.11",
- url="http://www.sqlite.org/sqlite-3.6.11.tar.gz",
- checksum='7ebb099696ab76cc6ff65dd496d17858',
+ name="SQLite 3.7.4",
+ url="http://www.sqlite.org/sqlite-autoconf-3070400.tar.gz",
+ checksum='8f0c690bfb33c3cbbc2471c3d9ba0158',
+ configure_env=('CFLAGS="-Os'
+ ' -DSQLITE_ENABLE_FTS3'
+ ' -DSQLITE_ENABLE_FTS3_PARENTHESIS'
+ ' -DSQLITE_ENABLE_RTREE'
+ ' -DSQLITE_TCL=0'
+ '"'),
configure_pre=[
'--enable-threadsafe',
- '--enable-tempstore',
'--enable-shared=no',
'--enable-static=yes',
- '--disable-tcl',
+ '--disable-readline',
+ '--disable-dependency-tracking',
]
),
dict(
@@ -194,6 +205,7 @@ def library_recipes():
url="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.5.tar.gz",
checksum='e73c1ac10b4bfc46db43b2ddfd6244ef',
configure_pre=[
+ "--enable-widec",
"--without-cxx",
"--without-ada",
"--without-progs",
@@ -220,24 +232,26 @@ def library_recipes():
),
])
- result.extend([
- dict(
- name="Sleepycat DB 4.7.25",
- url="http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz",
- checksum='ec2b87e833779681a0c3a814aa71359e',
- buildDir="build_unix",
- configure="../dist/configure",
- configure_pre=[
- '--includedir=/usr/local/include/db4',
- ]
- ),
- ])
+ if not PYTHON_3:
+ result.extend([
+ dict(
+ name="Sleepycat DB 4.7.25",
+ url="http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz",
+ checksum='ec2b87e833779681a0c3a814aa71359e',
+ buildDir="build_unix",
+ configure="../dist/configure",
+ configure_pre=[
+ '--includedir=/usr/local/include/db4',
+ ]
+ ),
+ ])
return result
# Instructions for building packages inside the .mpkg.
def pkg_recipes():
+ unselected_for_python3 = ('selected', 'unselected')[PYTHON_3]
result = [
dict(
name="PythonFramework",
@@ -249,6 +263,7 @@ def pkg_recipes():
wrappers for lots of Mac OS X API's.
""",
postflight="scripts/postflight.framework",
+ selected='selected',
),
dict(
name="PythonApplications",
@@ -262,6 +277,7 @@ def pkg_recipes():
It also installs a number of examples and demos.
""",
required=False,
+ selected='selected',
),
dict(
name="PythonUnixTools",
@@ -273,6 +289,7 @@ def pkg_recipes():
is not necessary to use Python.
""",
required=False,
+ selected='selected',
),
dict(
name="PythonDocumentation",
@@ -287,6 +304,7 @@ def pkg_recipes():
""",
postflight="scripts/postflight.documentation",
required=False,
+ selected='selected',
),
dict(
name="PythonProfileChanges",
@@ -304,6 +322,7 @@ def pkg_recipes():
topdir="/Library/Frameworks/Python.framework",
source="/empty-dir",
required=False,
+ selected=unselected_for_python3,
),
]
@@ -321,6 +340,7 @@ def pkg_recipes():
topdir="/Library/Frameworks/Python.framework",
source="/empty-dir",
required=False,
+ selected=unselected_for_python3,
)
)
return result
@@ -342,7 +362,7 @@ def fileContents(fn):
def runCommand(commandline):
"""
- Run a command and raise RuntimeError if it fails. Output is surpressed
+ Run a command and raise RuntimeError if it fails. Output is suppressed
unless the command fails.
"""
fd = os.popen(commandline, 'r')
@@ -387,6 +407,9 @@ def checkEnvironment():
Check that we're running on a supported system.
"""
+ if sys.version_info[0:2] < (2, 4):
+ fatal("This script must be run with Python 2.4 or later")
+
if platform.system() != 'Darwin':
fatal("This script should be run on a Mac OS X 10.4 (or later) system")
@@ -406,15 +429,16 @@ def checkEnvironment():
# to install a newer patch level.
for framework in ['Tcl', 'Tk']:
- fw = dict(lower=framework.lower(),
- upper=framework.upper(),
- cap=framework.capitalize())
- fwpth = "Library/Frameworks/%(cap)s.framework/%(lower)sConfig.sh" % fw
- sysfw = os.path.join('/System', fwpth)
+ #fw = dict(lower=framework.lower(),
+ # upper=framework.upper(),
+ # cap=framework.capitalize())
+ #fwpth = "Library/Frameworks/%(cap)s.framework/%(lower)sConfig.sh" % fw
+ fwpth = 'Library/Frameworks/Tcl.framework/Versions/Current'
+ sysfw = os.path.join(SDKPATH, 'System', fwpth)
libfw = os.path.join('/', fwpth)
usrfw = os.path.join(os.getenv('HOME'), fwpth)
- version = "%(upper)s_VERSION" % fw
- if getTclTkVersion(libfw, version) != getTclTkVersion(sysfw, version):
+ #version = "%(upper)s_VERSION" % fw
+ if os.readlink(libfw) != os.readlink(sysfw):
fatal("Version of %s must match %s" % (libfw, sysfw) )
if os.path.exists(usrfw):
fatal("Please rename %s to avoid possible dynamic load issues."
@@ -684,6 +708,9 @@ def buildRecipe(recipe, basedir, archList):
configure_args.insert(0, configure)
configure_args = [ shellQuote(a) for a in configure_args ]
+ if 'configure_env' in recipe:
+ configure_args.insert(0, recipe['configure_env'])
+
print "Running configure for %s"%(name,)
runCommand(' '.join(configure_args) + ' 2>&1')
@@ -739,9 +766,9 @@ def buildPython():
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'))
+ os.makedirs(buildDir)
+ os.makedirs(rootDir)
+ os.makedirs(os.path.join(rootDir, 'empty-dir'))
curdir = os.getcwd()
os.chdir(buildDir)
@@ -761,18 +788,20 @@ def buildPython():
print "Running configure..."
runCommand("%s -C --enable-framework --enable-universalsdk=%s "
"--with-universal-archs=%s "
+ "%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),
UNIVERSALARCHS,
+ (' ', '--with-computed-gotos ')[PYTHON_3],
shellQuote(WORKDIR)[1:-1],
shellQuote(WORKDIR)[1:-1]))
print "Running make"
runCommand("make")
- print "Running make frameworkinstall"
- runCommand("make frameworkinstall DESTDIR=%s"%(
+ print "Running make install"
+ runCommand("make install DESTDIR=%s"%(
shellQuote(rootDir)))
print "Running make frameworkinstallextras"
@@ -811,12 +840,33 @@ def buildPython():
os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP)
os.chown(p, -1, gid)
+ if PYTHON_3:
+ LDVERSION=None
+ VERSION=None
+ ABIFLAGS=None
+
+ fp = open(os.path.join(buildDir, 'Makefile'), 'r')
+ for ln in fp:
+ if ln.startswith('VERSION='):
+ VERSION=ln.split()[1]
+ if ln.startswith('ABIFLAGS='):
+ ABIFLAGS=ln.split()[1]
+ if ln.startswith('LDVERSION='):
+ LDVERSION=ln.split()[1]
+ fp.close()
+
+ LDVERSION = LDVERSION.replace('$(VERSION)', VERSION)
+ LDVERSION = LDVERSION.replace('$(ABIFLAGS)', ABIFLAGS)
+ config_suffix = '-' + LDVERSION
+ else:
+ config_suffix = '' # Python 2.x
+
# 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')
+ 'config' + config_suffix, 'Makefile')
fp = open(path, 'r')
data = fp.read()
fp.close()
@@ -841,14 +891,18 @@ def buildPython():
os.chdir(curdir)
-
+ if PYTHON_3:
+ # Remove the 'Current' link, that way we don't accidently mess
+ # with an already installed version of python 2
+ os.unlink(os.path.join(rootDir, 'Library', 'Frameworks',
+ 'Python.framework', 'Versions', 'Current'))
def patchFile(inPath, outPath):
data = fileContents(inPath)
data = data.replace('$FULL_VERSION', getFullVersion())
data = data.replace('$VERSION', getVersion())
data = data.replace('$MACOSX_DEPLOYMENT_TARGET', ''.join((DEPTARGET, ' or later')))
- data = data.replace('$ARCHITECTURES', "i386, ppc")
+ data = data.replace('$ARCHITECTURES', ", ".join(universal_opts_map[UNIVERSALARCHS]))
data = data.replace('$INSTALL_SIZE', installSize())
# This one is not handy as a template variable
@@ -975,7 +1029,7 @@ def makeMpkgPlist(path):
IFPkgFlagPackageList=[
dict(
IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()),
- IFPkgFlagPackageSelection='selected'
+ IFPkgFlagPackageSelection=item.get('selected', 'selected'),
)
for item in pkg_recipes()
],
diff --git a/Mac/BuildScript/resources/ReadMe.txt b/Mac/BuildScript/resources/ReadMe.txt
index d99f9f6437..761cffb06b 100644
--- a/Mac/BuildScript/resources/ReadMe.txt
+++ b/Mac/BuildScript/resources/ReadMe.txt
@@ -1,30 +1,36 @@
-This package will install MacPython $FULL_VERSION for Mac OS X
-$MACOSX_DEPLOYMENT_TARGET for the following
-architecture(s): $ARCHITECTURES.
+This package will install Python $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.
-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.
-You must install onto your current boot disk, even
-though the installer does not enforce this, otherwise
-things will not work.
+Python consists of the Python programming language interpreter, plus
+a set of programs to allow easy access to it for Mac users including
+an integrated development environment, IDLE, plus a set of pre-built
+extension modules that open up specific Macintosh technologies to
+Python programs.
-MacPython consists of the Python programming language
-interpreter, plus a set of programs to allow easy
-access to it for Mac users including an integrated development
-environment, IDLE, plus a set of pre-built extension modules
-that open up specific Macintosh technologies to Python programs.
+ **** IMPORTANT ****
+
+Before using IDLE or other programs using the tkinter graphical user
+interface toolkit, visit http://www.python.org/download/mac/tcltk/
+for current information about supported and recommended versions
+of Tcl/Tk for this version of Python and Mac OS X.
-The installer puts the applications in "Python $VERSION"
-in your Applications folder, command-line tools in
-/usr/local/bin and the underlying machinery in
-$PYTHONFRAMEWORKINSTALLDIR.
+ *******************
-More information on MacPython can be found at
-http://www.python.org/download/mac/.
+The installer puts applications, an "Update Shell Profile" command,
+and an Extras folder containing demo programs and tools into the
+"Python $VERSION" subfolder of the system Applications folder,
+and puts the underlying machinery into the folder
+$PYTHONFRAMEWORKINSTALLDIR. It can
+optionally place links to the command-line tools in /usr/local/bin as
+well. Double-click on the "Update Shell Profile" command to add the
+"bin" directory inside the framework to your shell's search path.
More information on Python in general can be found at
http://www.python.org.
diff --git a/Mac/BuildScript/resources/Welcome.rtf b/Mac/BuildScript/resources/Welcome.rtf
index 0753ea46a2..1fb7cd4831 100644
--- a/Mac/BuildScript/resources/Welcome.rtf
+++ b/Mac/BuildScript/resources/Welcome.rtf
@@ -1,18 +1,29 @@
-{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;}
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
-\paperw11900\paperh16840\margl1440\margr1440\vieww9920\viewh10660\viewkind0
+\paperw11904\paperh16836\margl1440\margr1440\vieww9640\viewh10620\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 .\
+\b Python $FULL_VERSION
+\b0 for
+\b Mac OS X $MACOSX_DEPLOYMENT_TARGET
+\b0 .\
\
-MacPython consists of the Python programming language interpreter, plus a set of programs to allow easy access to it for Mac users including an integrated development environment \b IDLE\b0 plus a set of pre-built extension modules that open up specific Macintosh technologies to Python programs.\
-\
-See the ReadMe file for more information.\
+
+\b Python for Mac OS X
+\b0 consists of the Python programming language interpreter, plus a set of programs to allow easy access to it for Mac OS X users including an integrated development environment
+\b IDLE
+\b0 and a set of pre-built extension modules that open up specific Macintosh technologies to Python programs.\
\
+See the ReadMe file and the Python documentation for more information.\
\
-This package will by default update your shell profile to ensure that this version of Python is on the search path of your shell. Please deselect the "Shell profile updater" package on the package customization screen if you want to avoid this modification. Double-click \b Update Shell Profile\b0 at any time to make $FULL_VERSION the default Python.} \ No newline at end of file
+
+\b IMPORTANT:
+\b0
+\b IDLE
+\b0 and other programs using the
+\b tkinter
+\b0 graphical user interface toolkit require specific versions of the
+\b Tcl/Tk
+\b0 platform independent windowing toolkit. Visit {\field{\*\fldinst{HYPERLINK "http://www.python.org/download/mac/tcltk/"}}{\fldrslt http://www.python.org/download/mac/tcltk/}} for current information on supported and recommended versions of Tcl/Tk for this version of Python and Mac OS X.} \ No newline at end of file
diff --git a/Mac/BuildScript/scripts/postflight.documentation b/Mac/BuildScript/scripts/postflight.documentation
index 9f5918ed78..31fbf2feff 100755
--- a/Mac/BuildScript/scripts/postflight.documentation
+++ b/Mac/BuildScript/scripts/postflight.documentation
@@ -1,11 +1,32 @@
#!/bin/sh
PYVER="@PYVER@"
+FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}"
+FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation"
+FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}"
+APPDIR="/Applications/Python ${PYVER}"
+DEV_DOCDIR="/Developer/Documentation"
+SHARE_DIR="${FWK}/share"
+SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}"
+SHARE_DOCDIR_TO_FWK="../../.."
-if [ -d /Developer/Documentation ]; then
- if [ ! -d /Developer/Documentation/Python ]; then
- mkdir -p /Developer/Documentation/Python
- fi
+# make link in /Developer/Documentation/ for Xcode users
+if [ -d "${DEV_DOCDIR}" ]; then
+ if [ ! -d "${DEV_DOCDIR}/Python" ]; then
+ mkdir -p "${DEV_DOCDIR}/Python"
+ fi
+ ln -fhs "${FWK_DOCDIR}" "${DEV_DOCDIR}/Python/Reference Documentation ${PYVER}"
+fi
+
+# make link in /Applications/Python m.n/ for Finder users
+if [ -d "${APPDIR}" ]; then
+ ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
+fi
- ln -fhs /Library/Frameworks/Python.framework/Versions/${PYVER}/Resources/English.lproj/Documentation "/Developer/Documentation/Python/Reference Documentation @PYVER@"
+# make share/doc link in framework for command line users
+if [ -d "${SHARE_DIR}" ]; then
+ mkdir -p "${SHARE_DOCDIR}"
+ # make relative link to html doc directory
+ ln -fhs "${SHARE_DOCDIR_TO_FWK}/${FWK_DOCDIR_SUBPATH}" "${SHARE_DOCDIR}/html"
fi
+
diff --git a/Mac/BuildScript/scripts/postflight.patch-profile b/Mac/BuildScript/scripts/postflight.patch-profile
index 5059bbc017..a66b8c787a 100755
--- a/Mac/BuildScript/scripts/postflight.patch-profile
+++ b/Mac/BuildScript/scripts/postflight.patch-profile
@@ -20,7 +20,7 @@ fi
# Make sure the directory ${PYTHON_ROOT}/bin is on the users PATH.
BSH="`basename "${theShell}"`"
case "${BSH}" in
-bash|ksh|sh|*csh)
+bash|ksh|sh|*csh|zsh)
if [ `id -ur` = 0 ]; then
P=`su - ${USER} -c 'echo A-X-4-X@@$PATH@@X-4-X-A' | grep 'A-X-4-X@@.*@@X-4-X-A' | sed -e 's/^A-X-4-X@@//g' -e 's/@@X-4-X-A$//g'`
else
@@ -57,7 +57,7 @@ case "${BSH}" in
cp -fp "${RC}" "${RC}.pysave"
fi
echo "" >> "${RC}"
- echo "# Setting PATH for MacPython ${PYVER}" >> "${RC}"
+ echo "# Setting PATH for Python ${PYVER}" >> "${RC}"
echo "# The orginal version is saved in .cshrc.pysave" >> "${RC}"
echo "set path=(${PYTHON_ROOT}/bin "'$path'")" >> "${RC}"
if [ `id -ur` = 0 ]; then
@@ -76,6 +76,9 @@ bash)
PR="${HOME}/.bash_profile"
fi
;;
+zsh)
+ PR="${HOME}/.zprofile"
+ ;;
*sh)
PR="${HOME}/.profile"
;;
@@ -86,7 +89,7 @@ if [ -f "${PR}" ]; then
cp -fp "${PR}" "${PR}.pysave"
fi
echo "" >> "${PR}"
-echo "# Setting PATH for MacPython ${PYVER}" >> "${PR}"
+echo "# Setting PATH for Python ${PYVER}" >> "${PR}"
echo "# The orginal version is saved in `basename ${PR}`.pysave" >> "${PR}"
echo 'PATH="'"${PYTHON_ROOT}/bin"':${PATH}"' >> "${PR}"
echo 'export PATH' >> "${PR}"
diff --git a/Mac/Demo/html.icons/modulator.gif b/Mac/Demo/html.icons/modulator.gif
deleted file mode 100644
index a75e1f9284..0000000000
--- a/Mac/Demo/html.icons/modulator.gif
+++ /dev/null
Binary files differ
diff --git a/Mac/IDLE/Info.plist.in b/Mac/IDLE/Info.plist.in
index 58e913c569..a711690da9 100644
--- a/Mac/IDLE/Info.plist.in
+++ b/Mac/IDLE/Info.plist.in
@@ -36,7 +36,7 @@
<key>CFBundleExecutable</key>
<string>IDLE</string>
<key>CFBundleGetInfoString</key>
- <string>%VERSION%, © 001-2006 Python Software Foundation</string>
+ <string>%VERSION%, © 2001-2011 Python Software Foundation</string>
<key>CFBundleIconFile</key>
<string>IDLE.icns</string>
<key>CFBundleIdentifier</key>
@@ -51,5 +51,14 @@
<string>%VERSION%</string>
<key>CFBundleVersion</key>
<string>%VERSION%</string>
+<!--
+ <key>LSMinimumSystemVersionByArchitecture</key>
+ <dict>
+ <key>x86_64</key>
+ <string>10.6.0</string>
+ <key>ppc64</key>
+ <string>10.6.0</string>
+ </dict>
+-->
</dict>
</plist>
diff --git a/Mac/IDLE/Makefile.in b/Mac/IDLE/Makefile.in
index 496c139e72..6ae360c61c 100644
--- a/Mac/IDLE/Makefile.in
+++ b/Mac/IDLE/Makefile.in
@@ -10,6 +10,8 @@ VERSION= @VERSION@
UNIVERSALSDK=@UNIVERSALSDK@
builddir= ../..
PYTHONFRAMEWORK=@PYTHONFRAMEWORK@
+LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@
+
RUNSHARED= @RUNSHARED@
BUILDEXE= @BUILDEXEEXT@
@@ -22,7 +24,7 @@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py
-PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
+PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
all: IDLE.app
@@ -51,9 +53,12 @@ IDLE.app: \
--iconfile=$(srcdir)/../Icons/IDLE.icns \
--resource=$(srcdir)/../Icons/PythonSource.icns \
--resource=$(srcdir)/../Icons/PythonCompiled.icns \
- --python=$(prefix)/Resources/Python.app/Contents/MacOS/$(PYTHONFRAMEWORK)`test -f "$(DESTDIR)$(prefix)/Resources/Python.app/Contents/MacOS/$(PYTHONFRAMEWORK)-32" && echo "-32"` \
+ --python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \
build
-
+ifneq ($(LIPO_32BIT_FLAGS),)
+ rm "IDLE.app/Contents/MacOS/Python"
+ lipo $(LIPO_32BIT_FLAGS) -output "IDLE.app/Contents/MacOS/Python" "$(BUILDPYTHON)"
+endif
Info.plist: $(srcdir)/Info.plist.in
sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(srcdir)/Info.plist.in > Info.plist
diff --git a/Mac/IDLE/config-extensions.def b/Mac/IDLE/config-extensions.def
index c17f068e2d..1791b9c0ae 100644
--- a/Mac/IDLE/config-extensions.def
+++ b/Mac/IDLE/config-extensions.def
@@ -86,3 +86,8 @@ bgcolor=LightGray
fgcolor=Black
[CodeContext_bindings]
toggle-code-context=
+
+[RstripExtension]
+enable=1
+enable_shell=0
+enable_editor=1
diff --git a/Mac/IDLE/idlemain.py b/Mac/IDLE/idlemain.py
index d6803ba832..8b8beb93d0 100644
--- a/Mac/IDLE/idlemain.py
+++ b/Mac/IDLE/idlemain.py
@@ -48,7 +48,7 @@ os.chdir(os.path.expanduser('~/Documents'))
# the interpreter in the framework, by following the symlink
# exported in PYTHONEXECUTABLE.
pyex = os.environ['PYTHONEXECUTABLE']
-sys.executable = os.path.join(os.path.dirname(pyex), os.readlink(pyex))
+sys.executable = os.path.join(sys.prefix, 'bin', 'python%d.%d'%(sys.version_info[:2]))
# Remove any sys.path entries for the Resources dir in the IDLE.app bundle.
p = pyex.partition('.app')
@@ -68,6 +68,8 @@ for idx, value in enumerate(sys.argv):
break
# Now it is safe to import idlelib.
+from idlelib import macosxSupport
+macosxSupport._appbundle = True
from idlelib.PyShell import main
if __name__ == '__main__':
main()
diff --git a/Mac/Makefile.in b/Mac/Makefile.in
index 949e229034..5ab0ae5f09 100644
--- a/Mac/Makefile.in
+++ b/Mac/Makefile.in
@@ -15,13 +15,14 @@ LDFLAGS=@LDFLAGS@
FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@
PYTHONFRAMEWORK=@PYTHONFRAMEWORK@
PYTHONFRAMEWORKIDENTIFIER=@PYTHONFRAMEWORKIDENTIFIER@
+LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@
+CC=@CC@
MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
export MACOSX_DEPLOYMENT_TARGET
-
# These are normally glimpsed from the previous set
bindir=$(prefix)/bin
-PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
+PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
APPINSTALLDIR=$(prefix)/Resources/Python.app
# Variables for installing the "normal" unix binaries
@@ -40,19 +41,12 @@ STRIPFLAG=-s
CPMAC=/Developer/Tools/CpMac
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)/Resources/app/Resources/English.lproj/Documentation
-DOCINDEX=$(DOCDIR)/"Documentation idx"
+APPSUBDIRS=MacOS Resources
CACHERSRC=$(srcdir)/scripts/cachersrc.py
compileall=$(srcdir)/../Lib/compileall.py
-installapps: install_Python install_BuildApplet install_PythonLauncher \
- install_IDLE checkapplepython install_pythonw install_versionedtools
-
-installapps4way: install_Python4way install_BuildApplet install_PythonLauncher install_IDLE install_pythonw4way install_versionedtools
+installapps: install_Python install_pythonw install_BuildApplet install_PythonLauncher \
+ install_IDLE checkapplepython install_versionedtools
install_pythonw: pythonw
@@ -60,33 +54,13 @@ install_pythonw: pythonw
$(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)"
ln -sf python$(VERSION) "$(DESTDIR)$(prefix)/bin/python"
ln -sf pythonw$(VERSION) "$(DESTDIR)$(prefix)/bin/pythonw"
-
-
-# Install 3 variants of python/pythonw:
-# - 32-bit (i386 and ppc)
-# - 64-bit (x86_64 and ppc64)
-# - all (all four architectures)
-# - Make 'python' and 'pythonw' aliases for the 32-bit variant
-install_pythonw4way: pythonw-32 pythonw-64 pythonw
- $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-64 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-64"
- $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-64 "$(DESTDIR)$(prefix)/bin/python$(VERSION)-64"
- ln -sf python$(VERSION)-64 "$(DESTDIR)$(prefix)/bin/python-64"
- ln -sf pythonw$(VERSION)-64 "$(DESTDIR)$(prefix)/bin/pythonw-64"
-
- $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32"
- $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)-32"
+ifneq ($(LIPO_32BIT_FLAGS),)
+ lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/python$(VERSION)-32 pythonw
+ lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32 pythonw
ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python-32"
ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw-32"
+endif
- $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-all"
- $(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)-all"
- ln -sf python$(VERSION)-all "$(DESTDIR)$(prefix)/bin/python-all"
- ln -sf pythonw$(VERSION)-all "$(DESTDIR)$(prefix)/bin/pythonw-all"
-
- ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)"
- ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python$(VERSION)"
- ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw"
- ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python"
#
# Install unix tools in /usr/local/bin. These are just aliases for the
@@ -96,18 +70,15 @@ installunixtools:
if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \
$(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\
fi
- for fn in python pythonw idle pydoc python-config smtpd.py \
+ for fn in python pythonw idle pydoc python-config smtpd.py 2to3 \
python$(VERSION) pythonw$(VERSION) idle$(VERSION) \
- pydoc$(VERSION) python$(VERSION)-config smtpd$(VERSION).py ;\
+ pydoc$(VERSION) python$(VERSION)-config smtpd$(VERSION).py \
+ 2to3-$(VERSION) ;\
do \
ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
done
-# TODO: install symlinks for -32, -64 and -all as well
-installunixtools4way: installunixtools
-
-
#
# Like installunixtools, but only install links to the versioned binaries.
#
@@ -120,9 +91,7 @@ altinstallunixtools:
do \
ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
done
-
-# TODO: -32, -64 and -all variants
-altinstallunixtools4way: altinstallunixtools
+ ln -fs "$(prefix)/bin/2to3-$(VERSION)" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/2to3-$(VERSION)" ;\
# By default most tools are installed without a version in their basename, to
# make it easier to install (and use) several python versions side-by-side move
@@ -145,29 +114,19 @@ install_versionedtools:
mv "$(DESTDIR)$(prefix)/bin/smtpd.py" "$(DESTDIR)$(prefix)/bin/smtpd$(VERSION).py" ;\
ln -sf "smtpd$(VERSION).py" "$(DESTDIR)$(prefix)/bin/smtpd.py" ;\
fi
+ if [ ! -h "$(DESTDIR)$(prefix)/bin/2to3" ]; then \
+ mv "$(DESTDIR)$(prefix)/bin/2to3" "$(DESTDIR)$(prefix)/bin/2to3-$(VERSION)" ;\
+ ln -sf "2to3-$(VERSION)" "$(DESTDIR)$(prefix)/bin/2to3" ;\
+ fi
pythonw: $(srcdir)/Tools/pythonw.c Makefile
- $(CC) $(LDFLAGS) -o $@ $(srcdir)/Tools/pythonw.c \
- -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"'
-
-pythonw-32: $(srcdir)/Tools/pythonw.c Makefile
- $(CC) $(LDFLAGS) -o pythonw-tmp.o $(srcdir)/Tools/pythonw.c \
- -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32"' ;\
- lipo @LIPO_32BIT_FLAGS@ -output $@ pythonw-tmp.o ; rm pythonw-tmp.o
-
-pythonw-64: $(srcdir)/Tools/pythonw.c Makefile
- $(CC) $(LDFLAGS) -o pythonw-tmp.o $(srcdir)/Tools/pythonw.c \
- -DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64"' ;\
- lipo @LIPO_64BIT_FLAGS@ -output $@ pythonw-tmp.o ; rm pythonw-tmp.o
+ $(CC) $(LDFLAGS) -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' -o $@ $(srcdir)/Tools/pythonw.c -I.. -I$(srcdir)/../Include ../$(PYTHONFRAMEWORK).framework/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
install_PythonLauncher:
cd PythonLauncher && make install DESTDIR=$(DESTDIR)
install_Python:
- @if test ! -f $(DOCINDEX); then \
- echo WARNING: you should run Apple Help Indexing Tool on $(DOCDIR); \
- fi
@for i in "$(PYTHONAPPSDIR)" "$(APPINSTALLDIR)" "$(APPINSTALLDIR)/Contents"; do \
if test ! -d "$(DESTDIR)$$i"; then \
echo "Creating directory $(DESTDIR)$$i"; \
@@ -218,11 +177,6 @@ install_Python:
> "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist"
rm "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in"
-install_Python4way: install_Python
- lipo @LIPO_32BIT_FLAGS@ -output "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-32" "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"
- lipo @LIPO_64BIT_FLAGS@ -output "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)-64" "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"
-
-
install_IDLE:
cd IDLE && make install
@@ -230,9 +184,13 @@ install_IDLE:
install_BuildApplet:
$(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \
--destroot "$(DESTDIR)" \
- --python=$(prefix)/Resources/Python.app/Contents/MacOS/$(PYTHONFRAMEWORK)`test -f "$(DESTDIR)$(prefix)/Resources/Python.app/Contents/MacOS/$(PYTHONFRAMEWORK)-32" && echo "-32"` \
+ --python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \
--output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \
$(srcdir)/scripts/BuildApplet.py
+ifneq ($(LIPO_32BIT_FLAGS),)
+ rm "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python"
+ lipo $(LIPO_32BIT_FLAGS) -output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" $(BUILDPYTHON)
+endif
MACLIBDEST=$(LIBDEST)/plat-mac
MACTOOLSDEST=$(prefix)/Mac/Tools
diff --git a/Mac/Modules/ColorPickermodule.c b/Mac/Modules/ColorPickermodule.c
index 824d4d3dcb..688c46846e 100644
--- a/Mac/Modules/ColorPickermodule.c
+++ b/Mac/Modules/ColorPickermodule.c
@@ -71,7 +71,7 @@ void initColorPicker(void)
{
PyObject *m;
- if (PyErr_WarnPy3k("In 3.x, ColorPicker is removed.", 1) < 0)
+ if (PyErr_WarnPy3k("In 3.x, the ColorPicker module is removed.", 1) < 0)
return;
/* Create the module and add the functions */
diff --git a/Mac/Modules/MacOS.c b/Mac/Modules/MacOS.c
index 79b2764981..28de4f5772 100644
--- a/Mac/Modules/MacOS.c
+++ b/Mac/Modules/MacOS.c
@@ -30,6 +30,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <Carbon/Carbon.h>
#include <ApplicationServices/ApplicationServices.h>
+#include <arpa/inet.h> /* for ntohl, htonl */
+
+
#ifndef HAVE_OSX105_SDK
typedef SInt16 FSIORefNum;
#endif
@@ -310,6 +313,10 @@ MacOS_GetCreatorAndType(PyObject *self, PyObject *args)
if ((err = FSpGetFInfo(&fss, &info)) != noErr) {
return PyErr_Mac(MacOS_Error, err);
}
+
+ info.fdCreator = ntohl(info.fdCreator);
+ info.fdType = ntohl(info.fdType);
+
creator = PyString_FromStringAndSize(
(char *)&info.fdCreator, 4);
type = PyString_FromStringAndSize((char *)&info.fdType, 4);
@@ -341,6 +348,8 @@ MacOS_GetCreatorAndType(PyObject *self, PyObject *args)
}
finfo = (FileInfo*)&(cataloginfo.finderInfo);
+ finfo->fileCreator = ntohl(finfo->fileCreator);
+ finfo->fileType = ntohl(finfo->fileType);
creator = PyString_FromStringAndSize((char*)&(finfo->fileCreator), 4);
type = PyString_FromStringAndSize((char*)&(finfo->fileType), 4);
@@ -686,7 +695,7 @@ initMacOS(void)
{
PyObject *m, *d;
- if (PyErr_WarnPy3k("In 3.x, MacOS is removed.", 1))
+ if (PyErr_WarnPy3k("In 3.x, the MacOS module is removed.", 1))
return;
m = Py_InitModule("MacOS", MacOS_Methods);
diff --git a/Mac/Modules/Nav.c b/Mac/Modules/Nav.c
index bd153cfb0a..d2aa7dbe93 100644
--- a/Mac/Modules/Nav.c
+++ b/Mac/Modules/Nav.c
@@ -930,16 +930,15 @@ static char Nav_module_documentation[] =
void
initNav(void)
{
- PyObject *m, *d;
-
- if (PyErr_WarnPy3k("In 3.x, Nav is removed.", 1))
- return;
-
#ifdef __LP64__
PyErr_SetString(PyExc_ImportError, "Navigation Services not available in 64-bit mode");
return;
#else /* !__LP64__ */
+ PyObject *m, *d;
+
+ if (PyErr_WarnPy3k("In 3.x, the Nav module is removed.", 1))
+ return;
/* Test that we have NavServices */
if ( !NavServicesAvailable() ) {
diff --git a/Mac/Modules/OSATerminology.c b/Mac/Modules/OSATerminology.c
index 0b76b3e3c3..2114d07059 100644
--- a/Mac/Modules/OSATerminology.c
+++ b/Mac/Modules/OSATerminology.c
@@ -1,10 +1,13 @@
/*
-** This module is a one-trick pony: given an FSSpec it gets the aeut
-** resources. It was written by Donovan Preston and slightly modified
-** by Jack.
+** An interface to the application scripting related functions of the OSA API.
**
-** It should be considered a placeholder, it will probably be replaced
-** by a full interface to OpenScripting.
+** GetAppTerminology - given an FSSpec/posix path to an application,
+** returns its aevt (scripting terminology) resource(s)
+**
+** GetSysTerminology - returns the AppleScript language component's
+** aeut (scripting terminology) resource
+**
+** Written by Donovan Preston and slightly modified by Jack and HAS.
*/
#include "Python.h"
#include "pymactoolbox.h"
@@ -26,12 +29,19 @@ PyOSA_GetAppTerminology(PyObject* self, PyObject* args)
if (!PyArg_ParseTuple(args, "O&|i", PyMac_GetFSSpec, &fss, &modeFlags))
return NULL;
+ /*
+ ** Note that we have to use the AppleScript component here. Who knows why
+ ** OSAGetAppTerminology should require a scripting component in the
+ ** first place, but it does. Note: doesn't work with the generic scripting
+ ** component, which is unfortunate as the AS component is currently very
+ ** slow (~1 sec?) to load, but we just have to live with this.
+ */
defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr');
err = GetComponentInstanceError (defaultComponent);
if (err) return PyMac_Error(err);
err = OSAGetAppTerminology (
defaultComponent,
- modeFlags,
+ kOSAModeNull,
&fss,
defaultTerminology,
&didLaunch,
@@ -45,29 +55,23 @@ static PyObject *
PyOSA_GetSysTerminology(PyObject* self, PyObject* args)
{
AEDesc theDesc = {0,0};
- FSSpec fss;
ComponentInstance defaultComponent = NULL;
SInt16 defaultTerminology = 0;
- Boolean didLaunch = 0;
OSAError err;
- long modeFlags = 0;
- if (!PyArg_ParseTuple(args, "O&|i", PyMac_GetFSSpec, &fss, &modeFlags))
- return NULL;
+ /* Accept any args for sake of backwards compatibility, then ignore them. */
defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr');
err = GetComponentInstanceError (defaultComponent);
if (err) return PyMac_Error(err);
- err = OSAGetAppTerminology (
+ err = OSAGetSysTerminology (
defaultComponent,
- modeFlags,
- &fss,
+ kOSAModeNull,
defaultTerminology,
- &didLaunch,
&theDesc
);
if (err) return PyMac_Error(err);
- return Py_BuildValue("O&i", AEDesc_New, &theDesc, didLaunch);
+ return Py_BuildValue("O&", AEDesc_New, &theDesc);
}
#endif /* !__LP64__ */
@@ -80,11 +84,11 @@ static struct PyMethodDef OSATerminology_methods[] =
{"GetAppTerminology",
(PyCFunction) PyOSA_GetAppTerminology,
METH_VARARGS,
- "Get an applications terminology, as an AEDesc object."},
+ "Get an application's terminology. GetAppTerminology(path) --> AEDesc"},
{"GetSysTerminology",
(PyCFunction) PyOSA_GetSysTerminology,
METH_VARARGS,
- "Get an applications system terminology, as an AEDesc object."},
+ "Get the AppleScript language's terminology. GetSysTerminology() --> AEDesc"},
#endif /* !__LP64__ */
{NULL, (PyCFunction) NULL, 0, NULL}
};
@@ -92,7 +96,7 @@ static struct PyMethodDef OSATerminology_methods[] =
void
initOSATerminology(void)
{
- if (PyErr_WarnPy3k("In 3.x, OSATerminology is removed.", 1) < 0)
+ if (PyErr_WarnPy3k("In 3.x, the OSATerminology module is removed.", 1) < 0)
return;
Py_InitModule("OSATerminology", OSATerminology_methods);
}
diff --git a/Mac/Modules/carbonevt/_CarbonEvtmodule.c b/Mac/Modules/carbonevt/_CarbonEvtmodule.c
index 49e948a5b7..623a3e5a6b 100755
--- a/Mac/Modules/carbonevt/_CarbonEvtmodule.c
+++ b/Mac/Modules/carbonevt/_CarbonEvtmodule.c
@@ -27,12 +27,6 @@ PyObject *EventHandlerCallRef_New(EventHandlerCallRef itself);
PyObject *EventRef_New(EventRef itself);
/********** EventTypeSpec *******/
-static PyObject*
-EventTypeSpec_New(EventTypeSpec *in)
-{
- return Py_BuildValue("ll", in->eventClass, in->eventKind);
-}
-
static int
EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out)
{
@@ -67,12 +61,6 @@ HIPoint_Convert(PyObject *v, HIPoint *out)
/********** EventHotKeyID *******/
-static PyObject*
-EventHotKeyID_New(EventHotKeyID *in)
-{
- return Py_BuildValue("ll", in->signature, in->id);
-}
-
static int
EventHotKeyID_Convert(PyObject *v, EventHotKeyID *out)
{
diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c
index 22e0bd59e5..a959eb4f56 100644
--- a/Mac/Modules/ctl/_Ctlmodule.c
+++ b/Mac/Modules/ctl/_Ctlmodule.c
@@ -1598,7 +1598,7 @@ static PyObject *CtlObj_GetBevelButtonMenuValue(ControlObject *_self, PyObject *
{
PyObject *_res = NULL;
OSErr _err;
- SInt16 outValue;
+ UInt16 outValue;
#ifndef GetBevelButtonMenuValue
PyMac_PRECHECK(GetBevelButtonMenuValue);
#endif
diff --git a/Mac/Modules/icgluemodule.c b/Mac/Modules/icgluemodule.c
index c4d5045f37..4d17bf7841 100644
--- a/Mac/Modules/icgluemodule.c
+++ b/Mac/Modules/icgluemodule.c
@@ -454,7 +454,7 @@ initicglue(void)
{
PyObject *m, *d;
- if (PyErr_WarnPy3k("In 3.x, icglue is removed.", 1))
+ if (PyErr_WarnPy3k("In 3.x, the icglue module is removed.", 1))
return;
/* Create the module and add the functions */
diff --git a/Mac/Modules/snd/_Sndmodule.c b/Mac/Modules/snd/_Sndmodule.c
index 35cd400aa4..d713efe13c 100644
--- a/Mac/Modules/snd/_Sndmodule.c
+++ b/Mac/Modules/snd/_Sndmodule.c
@@ -1150,7 +1150,9 @@ void init_Snd(void)
SPB_Type.ob_type = &PyType_Type;
if (PyType_Ready(&SPB_Type) < 0) return;
Py_INCREF(&SPB_Type);
+#if 0
PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);
+#endif
/* Backward-compatible name */
Py_INCREF(&SPB_Type);
PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type);
diff --git a/Mac/PythonLauncher/FileSettings.m b/Mac/PythonLauncher/FileSettings.m
index 1f3695eec1..66b4fdc086 100755
--- a/Mac/PythonLauncher/FileSettings.m
+++ b/Mac/PythonLauncher/FileSettings.m
@@ -267,14 +267,14 @@
[script length]-[[script lastPathComponent] length]];
if (honourhashbang &&
- (fp=fopen([script cString], "r")) &&
+ (fp=fopen([script fileSystemRepresentation], "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];
+ cur_interp = [NSString stringWithUTF8String: p];
}
if (!cur_interp)
cur_interp = interpreter;
diff --git a/Mac/PythonLauncher/Info.plist.in b/Mac/PythonLauncher/Info.plist.in
index 3c726d7524..439f8b8c2b 100644
--- a/Mac/PythonLauncher/Info.plist.in
+++ b/Mac/PythonLauncher/Info.plist.in
@@ -40,7 +40,7 @@
<key>CFBundleExecutable</key>
<string>PythonLauncher</string>
<key>CFBundleGetInfoString</key>
- <string>%VERSION%, © 001-2006 Python Software Foundation</string>
+ <string>%VERSION%, © 2001-2011 Python Software Foundation</string>
<key>CFBundleIconFile</key>
<string>PythonLauncher.icns</string>
<key>CFBundleIdentifier</key>
diff --git a/Mac/PythonLauncher/Makefile.in b/Mac/PythonLauncher/Makefile.in
index 2551d230f2..a6962f6eee 100644
--- a/Mac/PythonLauncher/Makefile.in
+++ b/Mac/PythonLauncher/Makefile.in
@@ -21,7 +21,7 @@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py
-PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
+PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
all: Python\ Launcher.app
diff --git a/Mac/README b/Mac/README
index b2ef8b15fa..522903ac73 100644
--- a/Mac/README
+++ b/Mac/README
@@ -8,13 +8,24 @@ the Python distribution.
Mac-specific arguments to configure
===================================
-* ``--enable-framework``
+* ``--enable-framework[=DIR]``
If this argument is specified the build will create a Python.framework rather
than a traditional Unix install. See the section
_`Building and using a framework-based Python on Mac OS X` for more
information on frameworks.
+ If the optional directory argument is specified the framework it installed
+ into that directory. This can be used to install a python framework into
+ your home directory::
+
+ $ configure --enable-framework=/Users/ronald/Library/Frameworks
+ $ make && make install
+
+ This will install the framework itself in ``/Users/ronald/Library/Frameworks``,
+ the applications in a subdirectory of ``/Users/ronald/Applications`` and the
+ command-line tools in ``/Users/ronald/bin``.
+
* ``--with-framework-name=NAME``
Specify the name for the python framework, defaults to ``Python``. This option
@@ -25,14 +36,14 @@ Mac-specific arguments to configure
Create a universal binary build of of Python. This can be used with both
regular and framework builds.
- The optional argument specifies with OSX SDK should be used to perform the
+ The optional argument specifies which OSX SDK should be used to perform the
build. This defaults to ``/Developer/SDKs/MacOSX.10.4u.sdk``, specify
``/`` when building on a 10.5 system, especially when building 64-bit code.
See the section _`Building and using a universal binary of Python on Mac OS X`
for more information.
-* ``--with-universal-archs=VALUE``
+* ``--with-univeral-archs=VALUE``
Specify the kind of universal binary that should be created. This option is
only valid when ``--enable-universalsdk`` is specified.
@@ -88,10 +99,29 @@ values are available:
* ``intel``: ``i386``, ``x86_64``
-To build a universal binary that includes a 64-bit architecture you must build
-on a system running OSX 10.5 or later. The ``all`` flavour can only be build on
+To build a universal binary that includes a 64-bit architecture, you must build
+on a system running OSX 10.5 or later. The ``all`` flavour can only be built on
OSX 10.5.
+The makefile for a framework build will install ``python32`` and ``pythonw32``
+binaries when the universal architecures includes at least one 32-bit architecture
+(that is, for all flavours but ``64-bit``).
+
+Running a specific archicture
+.............................
+
+You can run code using a specific architecture using the ``arch`` command::
+
+ $ arch -i386 python
+
+Or to explicitly run in 32-bit mode, regardless of the machine hardware::
+
+ $ arch -i386 -ppc python
+
+NOTE: When you're using a framework install of Python this requires at least
+Python 2.7 or 3.2, in earlier versions the python (and pythonw) commands are
+wrapper tools that execute the real interpreter without ensuring that the
+real interpreter runs with the same architecture.
Building and using a framework-based Python on Mac OS X.
========================================================
@@ -205,6 +235,25 @@ Because of the way the script locates the files it needs you have to run it
from within the BuildScript directory. The script accepts a number of
command-line arguments, run it with --help for more information.
+Configure warnings
+==================
+
+The configure script sometimes emits warnings like the one below::
+
+ configure: WARNING: libintl.h: present but cannot be compiled
+ configure: WARNING: libintl.h: check for missing prerequisite headers?
+ configure: WARNING: libintl.h: see the Autoconf documentation
+ configure: WARNING: libintl.h: section "Present But Cannot Be Compiled"
+ configure: WARNING: libintl.h: proceeding with the preprocessor's result
+ configure: WARNING: libintl.h: in the future, the compiler will take precedence
+ configure: WARNING: ## -------------------------------------- ##
+ configure: WARNING: ## Report this to http://bugs.python.org/ ##
+ configure: WARNING: ## -------------------------------------- ##
+
+This almost always means you are trying to build a universal binary for
+Python and have libaries in ``/usr/local`` that don't contain the required
+architectures. Temporarily move ``/usr/local`` aside to finish the build.
+
Uninstalling a framework install, including the binary installer
================================================================
diff --git a/Mac/Resources/app/Info.plist.in b/Mac/Resources/app/Info.plist.in
index 83d1b26a01..b586ba026c 100644
--- a/Mac/Resources/app/Info.plist.in
+++ b/Mac/Resources/app/Info.plist.in
@@ -20,7 +20,7 @@
<key>CFBundleExecutable</key>
<string>Python</string>
<key>CFBundleGetInfoString</key>
- <string>%version%, (c) 2004-2010 Python Software Foundation.</string>
+ <string>%version%, (c) 2004-2011 Python Software Foundation.</string>
<key>CFBundleHelpBookFolder</key>
<array>
<string>Documentation</string>
@@ -37,7 +37,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
- <string>%version%, (c) 2004-2010 Python Software Foundation.</string>
+ <string>%version%, (c) 2004-2011 Python Software Foundation.</string>
<key>CFBundleName</key>
<string>Python</string>
<key>CFBundlePackageType</key>
@@ -55,6 +55,6 @@
<key>NSAppleScriptEnabled</key>
<true/>
<key>NSHumanReadableCopyright</key>
- <string>(c) 2004 Python Software Foundation.</string>
+ <string>(c) 2011 Python Software Foundation.</string>
</dict>
</plist>
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif
deleted file mode 100644
index 2b93dc8d0c..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/community.html b/Mac/Resources/app/Resources/English.lproj/Documentation/community.html
deleted file mode 100644
index 140a38b2bf..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/community.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
-<html lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
- <title>What is MacPython?</title>
- <meta name="generator" content="BBEdit 6.5.3">
- <link rel="SHORTCUT ICON" href="pythonsmall.gif">
- <META NAME="AppleIcon" CONTENT="pythonsmall.gif">
-</head>
-<body>
- <table>
- <tr>
- <td>
- <img src="python.gif" width="128" height="128" align="top" alt="">
- </td>
- <td>
- <h1>MacPython Community</h1>
- </td>
- </tr>
- </table>
- <hr>
-
-<h2>Web Sites</h2>
-
-<p>The MacPython homepage, <a href="http://www.cwi.nl/~jack/macpython.html">
-www.cwi.nl/~jack/macpython.html</a>
-is where you can find installers, documents, links to useful packages and more.
-And, of course,
-<a href="http://www.python.org">www.python.org</a> has a much larger collection
-of material on Python that is not Mac-specific.</p>
-
-<h2>News groups and Mailing lists</h2>
-
-<p>There are a lot of mailing lists on Python. Some of the more interesting
-ones are:</p>
-<ul>
-<li><a href="mailto:python-help@python.org">python-help@python.org</a> where
-you can send questions for individual support. Please check the websites mentioned
-above first, though!</li>
-<li>The <a href="news:comp.lang.python">comp.lang.python</a> newsgroup for general
-discussion. Also available as a
-<a href="http://www.python.org/mailman/listinfo/python-list">mailing list</a>.</li>
-<li>The <a href="news:comp.lang.python.announce">comp.lang.python.announce</a>
-newsgroup for announcements. Low-volume and moderated. Also available as a
-<a href="http://www.python.org/mailman/listinfo/python-announce-list">mailing list</a>.</li>
-<li>Last but not least, the <a href="http://www.python.org/sigs/pythonmac-sig/">pythonmac-sig</a>
-mailing list is specifically for MacPython. Discussions on the implementation of new
-features, but beginners questions are welcome too.</li>
-</ul>
-
-<p>In addition there are Python <a href="http://www.python.org/sigs/">Special Interest Group</a>
-mailing lists on a wide variety of topics such as image processing, numerical algorithms
-and more.</p>
-
-<h2>More</h2>
-
-<p>An index of conferences, Wiki's, bookshops and more can be found at the
-<a href="http://www.python.org/psa/">Community</a> section of the Python website.</p>
-
-<p>If you find a bug you are kindly requested to report it, preferrably through the
-automatic bug tracker at <a href="http://www.python.org">www.python.org</a></p>
-
-<p>If you want to become an active developer you are very welcome! Join the
-pythonmac-sig mailing list mentioned above, and read the
-<a href="http://www.python.org/dev/">Developer</a> section on the Python website.</p>
-
-</body>
-</html>
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html
deleted file mode 100644
index 2ce7357a57..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
-<html lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
- <title>Python Language Documentation</title>
- <meta name="generator" content="BBEdit 6.5.3">
-</head>
-<body>
-<h1>Python Language and runtime documentation</h1>
-
-<p>This volume of documentation is rather big (17 Megabytes) and contains
-a tutorial, full description of the Python library (all the modules
-and packages included), formal description of the language and more.</p>
-
-<p>You can <a href="http://www.python.org/doc">view it online</a>, where
-you can also download PDFs for printing, or you can download and install it
-through the <a href="../packman.html">Package Manager</a> for viewing and
-searching via Apple Help Viewer.</p>
-</body>
-</html>
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html b/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html
deleted file mode 100644
index a8877ba885..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
-<html lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
- <title>Python and the Finder</title>
- <meta name="generator" content="BBEdit 6.5.3">
- <link rel="SHORTCUT ICON" href="pythonsmall.gif">
- <META NAME="AppleIcon" CONTENT="pythonsmall.gif">
-</head>
-<body>
-<h1>Running Python scripts from the Finder</h1>
- <table>
- <tr>
- <td>
- <img src="python.gif" width="128" height="128" align="top" alt="">
- </td>
- <td>
- <p>The application PythonLauncher will start a Python interpreter
- when you drop a Python source file onto it, any file with a <tt>.py</tt>
- or <tt>.pyw</tt> extension. If you set PythonLauncher as the default
- application to open a file
-(<a href="help:search=Changing%20the%20application%20that%20opens%20a%20file bookID=Mac%20Help">
-tell me more</a>) this also works when you double click a Python script.</p>
-
- <p>PythonLauncher has preferences per filetype for selecting
- the interpreter to use, and how to launch it: in a Terminal window
- or not, etc. Holding the Option key while launching your script will
- bring up a window that allows changing these settings for a single
- run. </p>
- </td>
- </tr>
- </table>
- <hr>
-</body>
-</html>
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html b/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html
deleted file mode 100644
index 252c78c32f..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
-<html lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
- <title>Creating a User Interface with MacPython</title>
- <meta name="generator" content="BBEdit 6.5.3">
- <link rel="SHORTCUT ICON" href="pythonsmall.gif">
- <META NAME="AppleIcon" CONTENT="pythonsmall.gif">
-</head>
-<body>
-<h1>Creating a User Interface with MacPython</h1>
-
-<p>There are a number of packages that allow creation of a user interface
-for your Python code, each of which has its own merits:</p>
-
-<ul>
- <li> The Carbon package gives low-level access to the old Macintosh toolbox
- calls for windows, events, dialogs and more. The <tt>FrameWork</tt> module
- wraps these in a minimal framework. For documentation see the Macintosh
- Library section of the <a href="doc/index.html">Python Language and runtime
- documentation</a> and the Human Interface Toolbox section of
- <a href="help:openbook=Carbon">Apple's Carbon Documentation</a>.
- This solution is compatible with MacPython-OS9.</li>
- <li> The <tt>W</tt> framework is built on top of this, and easier to use.
- The MacPython IDE uses W. Some documentation is available on
- <a href="http://www.nevada.edu/~cwebster/Python/index.html">Corran Webster's website</a>.
- Compatible with MacPython-OS9.</li>
-</ul>
-
-<p>For new work, however, one of the following packages may be better suited.
-They may be available out of the box in this distribution, otherwise you
-can install them through the <a href="packman.html">Package Manager</a>:</p>
-
-<ul>
- <li> <a href="http://pyobjc.sourceforge.net/">PyObjC</a> allows complete access to Cocoa.
- In technical terms it is a
- bidirectional bridge between Python and Objectve-C, similar to Apple's Java
- bridge. Probably the best choice for Mac OS X-only applications, but at the
- time of this writing PyObjC is still in beta.</li>
-
- <li> <a href="http://wxpython.sourceforge.net/">wxPython</a> gives Python programs
- access to the wxWindows GUI toolkit. Many people consider this
- the best open source cross-platform GUI solution available today.</li>
-
- <li> Tkinter is the oldest cross-platform GUI toolkit for Python, bridging Python
- to Tcl/Tk. If you install AquaTk it creates a native user interface on Mac OS X.
- Documented in the Library section, Tkinter subsection of the
- <a href="doc/index.html">Python Language and runtime documentation</a>. Tkinter
- is not available for MacPython-OS9.</li>
-</ul>
-
-</body>
-</html>
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/index.html
deleted file mode 100644
index 9dc33595a1..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/index.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
-<html lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
- <title>MacPython Help</title>
- <meta name="generator" content="BBEdit 6.5.3">
- <link rel="SHORTCUT ICON" href="pythonsmall.gif">
- <META NAME="AppleIcon" CONTENT="pythonsmall.gif">
- <META NAME="AppleTitle" CONTENT="MacPython Help">
-</head>
-<body>
-
-<h1>MacPython Help</h1>
- <table>
- <tr>
- <td>
- <img src="python.gif" width="128" height="128" align="top" alt="">
- </td>
- <td>
-<p>Choose a topic, or enter keywords into the search field:</p>
-<ul>
- <li><a href="intro.html">What is MacPython?</a>
- </li>
- <li><a href="doc/index.html">Python Language and runtime documentation</a>
- </li>
- <li><a href="finder.html">Running Python scripts from the Finder</a>
- </li>
- <li><a href="shell.html">Running Python scripts from the Unix Shell</a>
- </li>
- <li><a href="gui.html">Creating a User Interface with MacPython</a>
- </li>
- <li><a href="scripting.html">Controlling other Applications from MacPython</a>
- </li>
- <li><a href="packman.html">Installing additional functionality with the
- Package Manager</a>
- </li>
- <li><a href="community.html">MacPython community</a>
- </li>
-</ul>
-
- </td>
- </tr>
- </table>
- <hr>
-
-</body>
-</html>
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html b/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html
deleted file mode 100644
index f0ab3718bd..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
-<html lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
- <title>What is MacPython?</title>
- <meta name="generator" content="BBEdit 6.5.3">
- <link rel="SHORTCUT ICON" href="pythonsmall.gif">
- <META NAME="AppleIcon" CONTENT="pythonsmall.gif">
-</head>
-<body>
-<h1>What is MacPython?</h1>
- <table>
- <tr>
- <td>
- <img src="python.gif" width="128" height="128" align="top" alt="">
- </td>
- <td>
-<p>Python is a programming language. MacPython is a package containing
-that programming language plus Mac-specific tools and extensions.</p>
-
- </td>
- </tr>
- </table>
- <hr>
-
-<h2>The Python Language</h2>
-<p>The Python programming language is available for many hardware
-platforms, and most general documentation is Unix- or Windows-centered. Keep
-this in mind when reading the rest of this help, or information on the web.
-</p>
-
-<p>The Python website, <a href="http://www.python.org">www.python.org</a>,
-has a <em>Beginners Guide</em> section including an
-<a href="http://python.org/doc/essays/blurb.html">executive summary</a> on
-the language and a
-<a href="http://python.org/doc/essays/comparisons.html">comparison</a> of Python
-to other languages. Or read the (rather longwinded) Python
-Tutorial in the <a href="doc/index.html">Python Language and runtime documentation</a>.</p>
-
-<p>MacPython contains a complete <a href="shell.html">unix interpreter</a> so
-if you are familiar with Python on unix you should feel right at home.</p>
-
-<h2>MacPython additions</h2>
-
-<p>The MacPython Integrated Development Environment (IDE) allows
-easy editing, running and debugging of scripts. Read the
-<a href="ide/index.html">Introduction
-to the IDE</a> to whet your appetite.</p>
-
-<p>MacPython comes with lots of modules that allow access to
-MacOS-specific technology, such as Carbon, Quicktime and AppleScript.
-See the <em>Macintosh
-Modules</em> section of the
-<a href="doc/index.html">Python Language and runtime documentation</a>,
-but please keep in mind that some information there still pertains to
-Mac OS 9.
-
-Full access to the Cocoa APIs
-and tools such as Interface Builder is available separately through the
-<a href="packman.html">Package Manager</a>.</p>
-
-<p>The <a href="packman.html">Package Manager</a> also gives you access to extension
-packages for cross-platform GUI development (Tkinter, wxPython, PyOpenGL),
-image processing (PIL), scientific
-computing (Numeric) and much more. <em>PyObjC</em> deserves a special mention: it allows
-transparent access to Cocoa and Interface Builder, similar to what Java provides,
-thereby making Python a first class citizen in the Mac OS X developer world. </p>
-
-<p>Python scripts can be saved as <em>applets</em>, semi-standalone applications
-that work just like a normal application. Additionally you can even create
-true standalone application that have everything embedded and can be
-shipped to anyone, without the need to install Python. You do <em>not</em>
-need to install the Apple Developer Tools for this. </p>
-</body>
-</html>
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/packman.html b/Mac/Resources/app/Resources/English.lproj/Documentation/packman.html
deleted file mode 100644
index 355e0da8dc..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/packman.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
-<html lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
- <title>Python Package Manager</title>
- <meta name="generator" content="BBEdit 6.5.3">
- <link rel="SHORTCUT ICON" href="pythonsmall.gif">
- <META NAME="AppleIcon" CONTENT="pythonsmall.gif">
-</head>
-<body>
-<h1>Installing additional Python Packages</h1>
- <table>
- <tr>
- <td>
- <img src="PackageManager.gif" width="128" height="128" align="top" alt="">
- </td>
- <td>
- <p>The Python Package Manager helps you installing additional
- packages that enhance Python. It determines the exact MacOS version
- and Python version you have and uses that information to download
- a database that has packages that are test and tried on that
- combination. In other words: if something is in your Package Manager
- window but does not work you are free to blame the database maintainer.</p>
-
- <p>PackageManager then checks which of the packages you have installed
- and which ones not. This should also work when you have installed packages
- outside of PackageManager.
- You can select packages and install them, and PackageManager will work
- out the requirements and install these too.</p>
-
- <p>Often PackageManager will list a package in two flavors: binary
- and source. Binary should always work, source will only work if
- you have installed the Apple Developer Tools. PackageManager will warn
- you about this, and also about other external dependencies.</p>
-
- <p>PackageManager is available as a separate application and also
- as a function of the IDE, through the <tt>File-&gt;Package Manager</tt> menu
- entry. </p>
-
- <h2>Troubleshooting</h2>
-
- <p>If package manager fails to open the database first check that you are
- connected to the internet. If you are connected then the problem
- could be that there is no database (yet?) for your version of Mac OS X.
- You may be able to find an alternative
- database that works for your system at
- <a href="http://www.python.org/packman">http://www.python.org/packman</a>.
- In the standalone Package Manager you can then open such an alternative database
- with the <tt>File-&gt;Open URL...</tt> command, but you should realize that
- you are now on untested ground.</p>
-
- <p>Another potential problem source is that you are behind a firewall. This version
- of PackageManager uses the Unix method of setting a firewall: you need to set the
- environment variable <tt>http_proxy</tt> to <tt>"http://<i>proxyhost</i>:<i>port</i>"</tt>.
- See <a href="http://developer.apple.com/qa/qa2001/qa1067.html">Apple Technical
- Q&amp;A QA1067</a> for instructions.</p>
-
- </td>
- </tr>
- </table>
- <hr>
-</body>
-</html>
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif
deleted file mode 100644
index 3d4aa5debc..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif
deleted file mode 100644
index 440225ee95..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html b/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html
deleted file mode 100644
index 16321cb28e..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
-<html lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
- <title>Controlling other Applications from MacPython</title>
- <meta name="generator" content="BBEdit 6.5.3">
- <link rel="SHORTCUT ICON" href="pythonsmall.gif">
- <META NAME="AppleIcon" CONTENT="pythonsmall.gif">
-</head>
-<body>
-<h1>Controlling other Applications from MacPython</h1>
-
-<p>Python has a fairly complete implementation of the Open Scripting
-Architecure (OSA, also commonly referred to as AppleScript), allowing
-you to control scriptable applications from your Python program,
-and with a fairly pythonic interface. This piece of
-Python:</p>
-
-<blockquote><pre><tt>
-import Finder
-
-f = Finder.Finder()
-print f.get(f.window(1).name)
-</tt></pre></blockquote>
-
-<p>is identical to the following piece of AppleScript:</p>
-
-<blockquote><pre><tt>
-tell application "Finder"
- get name of window 1
-end tell
-</tt></pre></blockquote>
-
-<p>To send AppleEvents to an application you must first create the Python
-modules interfacing to the terminology of the application (what
-<tt>Script Editor</tt> calls the "Dictionary"). Use the IDE menu command
-<tt>File-&gt;Generate OSA Suite...</tt> for this. For more control run</p>
-
-<blockquote><tt>
-pythonw .../Lib/plat-mac/gensuitemodule.py --help
-</tt></blockquote>
-
-<p>from a terminal window.</p>
-
-<h2>Creating a scriptable application in Python</h2>
-
-You can also create a scriptable application in Python, but this is not
-very well documented. For Carbon
-applications you should look at the <tt>MiniAEFrame</tt> module.
-
-</body>
-</html>
diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html b/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html
deleted file mode 100644
index 56f564645a..0000000000
--- a/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
-<html lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
- <title>Python and the Unix Shell</title>
- <meta name="generator" content="BBEdit 6.5.3">
- <link rel="SHORTCUT ICON" href="pythonsmall.gif">
- <META NAME="AppleIcon" CONTENT="pythonsmall.gif">
-</head>
-<body>
-<h1>Running Python scripts from the Unix Shell</h1>
- <table>
- <tr>
- <td>
- <img src="python.gif" width="128" height="128" align="top" alt="">
- </td>
- <td>
- <p>MacPython 2.3 installs a perfectly normal Unix commandline
- python interpreter in <tt>/usr/local/bin/python</tt>. As of Mac OS X 10.2, however,
- <tt>/usr/local/bin</tt> is not on the search path of your shell. Moreover,
- Apple's python 2.2, which lives in <tt>/usr/bin</tt> <em>is</em> on your
- search path, so this can lead to confusion.</p>
-
- <p>If you use <tt>tcsh</tt> you should add the following line
- to the file <tt>.login</tt> in your home directory and restart Terminal:
- <br>
- <tt>setenv PATH /usr/local/bin:$PATH</tt>
- </p>
-
- <p>If you use <tt>bash</tt> or <tt>zsh</tt>
- you should add the following line
- to the file <tt>.profile</tt> in your home directory and restart Terminal:
- <br>
- <tt>export PATH=/usr/local/bin:$PATH</tt>
- </p>
-
- <h2>GUI scripts</h2>
-
- <p>Due to the way MacOS handles windowing applications you need to run
- <em>all</em> scripts that use the window manager (be it through
- Carbon, Cocoa, Tkinter, wxPython, PyOpenGL or anything else) with the
- <tt>pythonw</tt> interpreter, also installed in <tt>/usr/local/bin</tt>.</p>
-
- <p>Running with <tt>python</tt> results in an inability to bring the
- script to the front, or interacting with it. </p>
- </td>
- </tr>
- </table>
- <hr>
-</body>
-</html>
diff --git a/Mac/Resources/framework/Info.plist.in b/Mac/Resources/framework/Info.plist.in
index a753e88d79..b5b19d4ce5 100644
--- a/Mac/Resources/framework/Info.plist.in
+++ b/Mac/Resources/framework/Info.plist.in
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>%VERSION%, (c) 2004-2008 Python Software Foundation.</string>
+ <string>%VERSION%, (c) 2004-2011 Python Software Foundation.</string>
<key>CFBundleLongVersionString</key>
- <string>%VERSION%, (c) 2004-2008 Python Software Foundation.</string>
+ <string>%VERSION%, (c) 2004-2011 Python Software Foundation.</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
diff --git a/Mac/Resources/iconsrc/IDE.psd b/Mac/Resources/iconsrc/IDE.psd
deleted file mode 100644
index b9637b993f..0000000000
--- a/Mac/Resources/iconsrc/IDE.psd
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/iconsrc/PackageManager.psd b/Mac/Resources/iconsrc/PackageManager.psd
deleted file mode 100644
index 42f41b125f..0000000000
--- a/Mac/Resources/iconsrc/PackageManager.psd
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/iconsrc/PythonApplet.psd b/Mac/Resources/iconsrc/PythonApplet.psd
deleted file mode 100644
index 7458b52c57..0000000000
--- a/Mac/Resources/iconsrc/PythonApplet.psd
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/iconsrc/PythonCompiled.psd b/Mac/Resources/iconsrc/PythonCompiled.psd
deleted file mode 100755
index 61fc4d18ae..0000000000
--- a/Mac/Resources/iconsrc/PythonCompiled.psd
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/iconsrc/PythonIcon.psd b/Mac/Resources/iconsrc/PythonIcon.psd
deleted file mode 100755
index d818dc6a14..0000000000
--- a/Mac/Resources/iconsrc/PythonIcon.psd
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/iconsrc/PythonSource.psd b/Mac/Resources/iconsrc/PythonSource.psd
deleted file mode 100755
index eba8f28d37..0000000000
--- a/Mac/Resources/iconsrc/PythonSource.psd
+++ /dev/null
Binary files differ
diff --git a/Mac/Resources/iconsrc/PythonWSource.psd b/Mac/Resources/iconsrc/PythonWSource.psd
deleted file mode 100644
index 2b84d94851..0000000000
--- a/Mac/Resources/iconsrc/PythonWSource.psd
+++ /dev/null
Binary files differ
diff --git a/Mac/Tools/Doc/HelpIndexingTool/Help_Indexing_Tool_Suite.py b/Mac/Tools/Doc/HelpIndexingTool/Help_Indexing_Tool_Suite.py
deleted file mode 100644
index 58d73076df..0000000000
--- a/Mac/Tools/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/Tools/Doc/HelpIndexingTool/Miscellaneous_Standards.py b/Mac/Tools/Doc/HelpIndexingTool/Miscellaneous_Standards.py
deleted file mode 100644
index 3cf745f986..0000000000
--- a/Mac/Tools/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/Tools/Doc/HelpIndexingTool/Required_Suite.py b/Mac/Tools/Doc/HelpIndexingTool/Required_Suite.py
deleted file mode 100644
index eb9fee0017..0000000000
--- a/Mac/Tools/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/Tools/Doc/HelpIndexingTool/Standard_Suite.py b/Mac/Tools/Doc/HelpIndexingTool/Standard_Suite.py
deleted file mode 100644
index 0e62a02f57..0000000000
--- a/Mac/Tools/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 is not 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/Tools/Doc/HelpIndexingTool/__init__.py b/Mac/Tools/Doc/HelpIndexingTool/__init__.py
deleted file mode 100644
index 5359df53c4..0000000000
--- a/Mac/Tools/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/Tools/Doc/HelpIndexingTool/odds_and_ends.py b/Mac/Tools/Doc/HelpIndexingTool/odds_and_ends.py
deleted file mode 100644
index 7ee46f35cc..0000000000
--- a/Mac/Tools/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/Tools/Doc/README b/Mac/Tools/Doc/README
deleted file mode 100644
index 4f4d53d01e..0000000000
--- a/Mac/Tools/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/Tools/Doc/setup.py b/Mac/Tools/Doc/setup.py
deleted file mode 100644
index 05c678f46d..0000000000
--- a/Mac/Tools/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 is None:
- build_cmd = self.get_finalized_command('build')
- self.build_dest = build_cmd.build_dest
- if self.install_doc is 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/Tools/fixapplepython23.py b/Mac/Tools/fixapplepython23.py
index 6ba54019f0..03c799b567 100644
--- a/Mac/Tools/fixapplepython23.py
+++ b/Mac/Tools/fixapplepython23.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
"""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
diff --git a/Mac/Tools/pythonw.c b/Mac/Tools/pythonw.c
index e70a76f846..76734c1063 100644
--- a/Mac/Tools/pythonw.c
+++ b/Mac/Tools/pythonw.c
@@ -3,15 +3,176 @@
* 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.
+ *
+ * This program uses posix_spawn rather than plain execv because we need
+ * slightly more control over how the "real" interpreter is executed.
+ *
+ * On OSX 10.4 (and earlier) this falls back to using exec because the
+ * posix_spawnv functions aren't available there.
*/
+#pragma weak_import posix_spawnattr_init
+#pragma weak_import posix_spawnattr_setbinpref_np
+#pragma weak_import posix_spawnattr_setflags
+#pragma weak_import posix_spawn
+
+#include <Python.h>
#include <unistd.h>
+#ifdef HAVE_SPAWN_H
+#include <spawn.h>
+#endif
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
#include <err.h>
+#include <dlfcn.h>
+#include <stdlib.h>
+
+
+extern char** environ;
+
+/*
+ * Locate the python framework by looking for the
+ * library that contains Py_Initialize.
+ *
+ * In a regular framework the structure is:
+ *
+ * Python.framework/Versions/2.7
+ * /Python
+ * /Resources/Python.app/Contents/MacOS/Python
+ *
+ * In a virtualenv style structure the expected
+ * structure is:
+ *
+ * ROOT
+ * /bin/pythonw
+ * /.Python <- the dylib
+ * /.Resources/Python.app/Contents/MacOS/Python
+ *
+ * NOTE: virtualenv's are not an officially supported
+ * feature, support for that structure is provided as
+ * a convenience.
+ */
+static char* get_python_path(void)
+{
+ size_t len;
+ Dl_info info;
+ char* end;
+ char* g_path;
+
+ if (dladdr(Py_Initialize, &info) == 0) {
+ return NULL;
+ }
+
+ len = strlen(info.dli_fname);
+
+ g_path = malloc(len+60);
+ if (g_path == NULL) {
+ return NULL;
+ }
+
+ strcpy(g_path, info.dli_fname);
+ end = g_path + len - 1;
+ while (end != g_path && *end != '/') {
+ end --;
+ }
+ end++;
+ if (*end == '.') {
+ end++;
+ }
+ strcpy(end, "Resources/Python.app/Contents/MacOS/" PYTHONFRAMEWORK);
+
+ return g_path;
+}
+
+#ifdef HAVE_SPAWN_H
+static void
+setup_spawnattr(posix_spawnattr_t* spawnattr)
+{
+ size_t ocount;
+ size_t count;
+ cpu_type_t cpu_types[1];
+ short flags = 0;
+#ifdef __LP64__
+ int ch;
+#endif
+
+ if ((errno = posix_spawnattr_init(spawnattr)) != 0) {
+ err(2, "posix_spawnattr_int");
+ /* NOTREACHTED */
+ }
+
+ count = 1;
+
+ /* Run the real python executable using the same architecture as this
+ * executable, this allows users to control the architecture using
+ * "arch -ppc python"
+ */
+
+#if defined(__ppc64__)
+ cpu_types[0] = CPU_TYPE_POWERPC64;
+
+#elif defined(__x86_64__)
+ cpu_types[0] = CPU_TYPE_X86_64;
+
+#elif defined(__ppc__)
+ cpu_types[0] = CPU_TYPE_POWERPC;
+#elif defined(__i386__)
+ cpu_types[0] = CPU_TYPE_X86;
+#else
+# error "Unknown CPU"
+#endif
+
+ if (posix_spawnattr_setbinpref_np(spawnattr, count,
+ cpu_types, &ocount) == -1) {
+ err(1, "posix_spawnattr_setbinpref");
+ /* NOTREACHTED */
+ }
+ if (count != ocount) {
+ fprintf(stderr, "posix_spawnattr_setbinpref failed to copy\n");
+ exit(1);
+ /* NOTREACHTED */
+ }
+
+
+ /*
+ * Set flag that causes posix_spawn to behave like execv
+ */
+ flags |= POSIX_SPAWN_SETEXEC;
+ if ((errno = posix_spawnattr_setflags(spawnattr, flags)) != 0) {
+ err(1, "posix_spawnattr_setflags");
+ /* NOTREACHTED */
+ }
+}
+#endif
+
+int
+main(int argc, char **argv) {
+ char* exec_path = get_python_path();
+
+ /*
+ * Let argv[0] refer to the new interpreter. This is needed to
+ * get the effect we want on OSX 10.5 or earlier. That is, without
+ * changing argv[0] the real interpreter won't have access to
+ * the Window Server.
+ */
+ argv[0] = exec_path;
+
+#ifdef HAVE_SPAWN_H
+
+ /* We're weak-linking to posix-spawnv to ensure that
+ * an executable build on 10.5 can work on 10.4.
+ */
+ if (posix_spawn != NULL) {
+ posix_spawnattr_t spawnattr = NULL;
-static char Python[] = PYTHONWEXECUTABLE;
-int main(int argc, char **argv) {
- argv[0] = Python;
- execv(Python, argv);
- err(1, "execv: %s", Python);
- /* NOTREACHED */
+ setup_spawnattr(&spawnattr);
+ posix_spawn(NULL, exec_path, NULL,
+ &spawnattr, argv, environ);
+ err(1, "posix_spawn: %s", exec_path);
+ }
+#endif
+ execve(exec_path, argv, environ);
+ err(1, "execve: %s", argv[0]);
+ /* NOTREACHED */
}
diff --git a/Mac/scripts/BuildApplet.py b/Mac/scripts/BuildApplet.py
index eeeb82bfd7..a76ed90872 100644
--- a/Mac/scripts/BuildApplet.py
+++ b/Mac/scripts/BuildApplet.py
@@ -112,9 +112,6 @@ def buildapplet():
usage()
elif opt in ('-d', '--destroot'):
destroot = arg
- # On OS9 always be verbose
- if sys.platform == 'mac' and not verbose:
- verbose = 'default'
# Loop over all files to be processed
for filename in args:
cr, tp = MacOS.GetCreatorAndType(filename)
diff --git a/Mac/scripts/zappycfiles.py b/Mac/scripts/zappycfiles.py
index a8193c1206..6d3574877d 100644
--- a/Mac/scripts/zappycfiles.py
+++ b/Mac/scripts/zappycfiles.py
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python
+#!/usr/bin/env python
"""Recursively zap all .pyc and .pyo files"""
import os
import sys
@@ -9,15 +9,8 @@ doit = 1
def main():
if not sys.argv[1:]:
- if os.name == 'mac':
- import EasyDialogs
- dir = EasyDialogs.AskFolder(message='Directory to zap pyc files in')
- if not dir:
- sys.exit(0)
- zappyc(dir)
- else:
- print 'Usage: zappyc dir ...'
- sys.exit(1)
+ print 'Usage: zappyc dir ...'
+ sys.exit(1)
for dir in sys.argv[1:]:
zappyc(dir)