Rework the build system for osx applications:
* Don't use xcodebuild for building PythonLauncher, but use a normal unix
makefile. This makes it a lot easier to use the same build flags as for the
rest of python (e.g. make a universal version of python launcher)
* Convert the mac makefile-s to makefile.in-s and use configure to set makefile
variables instead of forwarding them as command-line arguments
* Add a C version of pythonw, that we you can use '#!/usr/local/bin/pythonw'
* Build IDLE.app using bundlebuilder instead of BuildApplet, that will allow
easier modification of the bundle contents later on.
diff --git a/Mac/OSX/IDLE/idlemain.py b/Mac/OSX/IDLE/idlemain.py
new file mode 100644
index 0000000..b7a3c04
--- /dev/null
+++ b/Mac/OSX/IDLE/idlemain.py
@@ -0,0 +1,19 @@
+import argvemulator
+from idlelib.PyShell import main
+import sys, os
+
+# Make sure sys.executable points to the python interpreter inside the
+# framework, instead of at the helper executable inside the application
+# bundle (the latter works, but doesn't allow access to the window server)
+sys.executable = os.path.join(sys.prefix, 'bin', 'python')
+
+# Look for the -psn argument that the launcher adds and remove it, it will
+# only confuse the IDLE startup code.
+for idx, value in enumerate(sys.argv):
+ if value.startswith('-psn_'):
+ del sys.argv[idx]
+ break
+
+argvemulator.ArgvCollector().mainloop()
+if __name__ == '__main__':
+ main()