summaryrefslogtreecommitdiffstats
path: root/Mac/IDLE/IDLE.app
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-07-01 18:23:09 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-07-01 18:23:09 (GMT)
commitde9c869fb8c1f842bc3dfc4d51f287cb6b644ab2 (patch)
treeda0b9c0e9d56288354f936b59021d94018a172a8 /Mac/IDLE/IDLE.app
parentbbfd71d7ac02bc2053a0ba494a3f055fbec8deee (diff)
downloadcpython-de9c869fb8c1f842bc3dfc4d51f287cb6b644ab2.zip
cpython-de9c869fb8c1f842bc3dfc4d51f287cb6b644ab2.tar.gz
cpython-de9c869fb8c1f842bc3dfc4d51f287cb6b644ab2.tar.bz2
Hopefully fix make framework install on Mac (see 3174)
Removal of the Mac modules broke many of the Mac scripts (including BuildApplet.py) so the building of the Python launcher and IDLE.app was broken. I manually copied built versions of those apps into Mac. Everything else which used Mac modules had to die.
Diffstat (limited to 'Mac/IDLE/IDLE.app')
-rw-r--r--Mac/IDLE/IDLE.app/Contents/Info.plist57
-rwxr-xr-xMac/IDLE/IDLE.app/Contents/MacOS/IDLE23
l---------Mac/IDLE/IDLE.app/Contents/MacOS/Python1
-rw-r--r--Mac/IDLE/IDLE.app/Contents/PkgInfo1
-rw-r--r--Mac/IDLE/IDLE.app/Contents/Resources/IDLE.icnsbin0 -> 53456 bytes
-rw-r--r--Mac/IDLE/IDLE.app/Contents/Resources/PythonCompiled.icnsbin0 -> 60777 bytes
-rw-r--r--Mac/IDLE/IDLE.app/Contents/Resources/PythonSource.icnsbin0 -> 54522 bytes
-rw-r--r--Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py30
8 files changed, 112 insertions, 0 deletions
diff --git a/Mac/IDLE/IDLE.app/Contents/Info.plist b/Mac/IDLE/IDLE.app/Contents/Info.plist
new file mode 100644
index 0000000..a097c1a
--- /dev/null
+++ b/Mac/IDLE/IDLE.app/Contents/Info.plist
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>py</string>
+ <string>pyw</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>PythonSource.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>Python Script</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>pyc</string>
+ <string>pyo</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>PythonCompiled.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>Python Bytecode Document</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ </dict>
+ </array>
+ <key>CFBundleExecutable</key>
+ <string>IDLE</string>
+ <key>CFBundleGetInfoString</key>
+ <string>2.6.0, © 001-2006 Python Software Foundation</string>
+ <key>CFBundleIconFile</key>
+ <string>IDLE.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.python.IDLE</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>IDLE</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>2.6.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>2.6.0</string>
+</dict>
+</plist>
diff --git a/Mac/IDLE/IDLE.app/Contents/MacOS/IDLE b/Mac/IDLE/IDLE.app/Contents/MacOS/IDLE
new file mode 100755
index 0000000..15afffa
--- /dev/null
+++ b/Mac/IDLE/IDLE.app/Contents/MacOS/IDLE
@@ -0,0 +1,23 @@
+#!/Library/Frameworks/Python.framework/Versions/3.0/Resources/Python.app/Contents/MacOS/Python
+
+import sys, os
+execdir = os.path.dirname(sys.argv[0])
+executable = os.path.join(execdir, "Python")
+resdir = os.path.join(os.path.dirname(execdir), "Resources")
+libdir = os.path.join(os.path.dirname(execdir), "Frameworks")
+mainprogram = os.path.join(resdir, "idlemain.py")
+
+sys.argv.insert(1, mainprogram)
+if 0 or 0:
+ os.environ["PYTHONPATH"] = resdir
+ if 0:
+ os.environ["PYTHONHOME"] = resdir
+else:
+ pypath = os.getenv("PYTHONPATH", "")
+ if pypath:
+ pypath = ":" + pypath
+ os.environ["PYTHONPATH"] = resdir + pypath
+os.environ["PYTHONEXECUTABLE"] = executable
+os.environ["DYLD_LIBRARY_PATH"] = libdir
+os.environ["DYLD_FRAMEWORK_PATH"] = libdir
+os.execve(executable, sys.argv, os.environ)
diff --git a/Mac/IDLE/IDLE.app/Contents/MacOS/Python b/Mac/IDLE/IDLE.app/Contents/MacOS/Python
new file mode 120000
index 0000000..c8ff949
--- /dev/null
+++ b/Mac/IDLE/IDLE.app/Contents/MacOS/Python
@@ -0,0 +1 @@
+/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python \ No newline at end of file
diff --git a/Mac/IDLE/IDLE.app/Contents/PkgInfo b/Mac/IDLE/IDLE.app/Contents/PkgInfo
new file mode 100644
index 0000000..bd04210
--- /dev/null
+++ b/Mac/IDLE/IDLE.app/Contents/PkgInfo
@@ -0,0 +1 @@
+APPL???? \ No newline at end of file
diff --git a/Mac/IDLE/IDLE.app/Contents/Resources/IDLE.icns b/Mac/IDLE/IDLE.app/Contents/Resources/IDLE.icns
new file mode 100644
index 0000000..c12c9da
--- /dev/null
+++ b/Mac/IDLE/IDLE.app/Contents/Resources/IDLE.icns
Binary files differ
diff --git a/Mac/IDLE/IDLE.app/Contents/Resources/PythonCompiled.icns b/Mac/IDLE/IDLE.app/Contents/Resources/PythonCompiled.icns
new file mode 100644
index 0000000..7d9f320
--- /dev/null
+++ b/Mac/IDLE/IDLE.app/Contents/Resources/PythonCompiled.icns
Binary files differ
diff --git a/Mac/IDLE/IDLE.app/Contents/Resources/PythonSource.icns b/Mac/IDLE/IDLE.app/Contents/Resources/PythonSource.icns
new file mode 100644
index 0000000..9e35c1e
--- /dev/null
+++ b/Mac/IDLE/IDLE.app/Contents/Resources/PythonSource.icns
Binary files differ
diff --git a/Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py b/Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py
new file mode 100644
index 0000000..9b52738
--- /dev/null
+++ b/Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py
@@ -0,0 +1,30 @@
+"""
+Bootstrap script for IDLE as an application bundle.
+"""
+import sys, os
+
+from idlelib.PyShell import main
+
+# Change the current directory the user's home directory, that way we'll get
+# a more useful default location in the open/save dialogs.
+os.chdir(os.path.expanduser('~/Documents'))
+
+
+# Make sure sys.executable points to the python interpreter inside the
+# framework, instead of at the helper executable inside the application
+# bundle (the latter works, but doesn't allow access to the window server)
+if sys.executable.endswith('-32'):
+ sys.executable = os.path.join(sys.prefix, 'bin', 'python-32')
+else:
+ sys.executable = os.path.join(sys.prefix, 'bin', 'python')
+
+# Look for the -psn argument that the launcher adds and remove it, it will
+# only confuse the IDLE startup code.
+for idx, value in enumerate(sys.argv):
+ if value.startswith('-psn_'):
+ del sys.argv[idx]
+ break
+
+#argvemulator.ArgvCollector().mainloop()
+if __name__ == '__main__':
+ main()