patch-nad0016 3.x OS X IDLE.app does not launch ANALYSIS 2.x IDLE.app was built using its own Makefile + bundlebuilder. For 3.x, these were eliminated by checking in a skeleton app based on the bundlebuilder model. But the install tailoring of the app does not quite work in all cases. SOLUTION Have the Mac/Makefile do the necessary tailoring. Remove from the IDLE launch script the unnecessary bits left over from bundlebuilder. APPLIES py3k, 3.0 SEE ALSO patch-nad0014, patch-nad0015 (should be applied first) diff -r ea357981a4c9 Mac/IDLE/IDLE.app/Contents/MacOS/IDLE --- Mac/IDLE/IDLE.app/Contents/MacOS/IDLE Mon Feb 09 11:05:43 2009 -0800 +++ Mac/IDLE/IDLE.app/Contents/MacOS/IDLE Mon Feb 09 11:05:50 2009 -0800 @@ -1,23 +1,11 @@ -#!%prefix%/Resources/Python.app/Contents/MacOS/Python3 - +#!%prefix%/Resources/Python.app/Contents/MacOS/%exe% +# +# see IDLE.app/Resources/idlemain.py for details 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 -r ea357981a4c9 Mac/Makefile.in --- Mac/Makefile.in Mon Feb 09 11:05:43 2009 -0800 +++ Mac/Makefile.in Mon Feb 09 11:05:50 2009 -0800 @@ -49,7 +49,7 @@ checkapplepython install_pythonw install_versionedtools installapps4way: install_Python4way install_PythonLauncher \ - install_IDLE install_pythonw4way install_versionedtools + install_IDLE4way install_pythonw4way install_versionedtools install_pythonw: pythonw @@ -217,7 +217,7 @@ test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" /bin/cp -PR "$(srcdir)/IDLE/IDLE.app" "$(DESTDIR)$(PYTHONAPPSDIR)" - ln -sf $(INSTALLED_PYTHONAPP) "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python" + ln -sf "$(INSTALLED_PYTHONAPP)" "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python" sed -e "s!%prefix%!$(prefix)!g" -e 's!%exe%!$(PYTHONFRAMEWORK)!g' < "$(srcdir)/IDLE/IDLE.app/Contents/MacOS/IDLE" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/IDLE" sed "s!%version%!`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`!g" < "$(srcdir)/IDLE/IDLE.app/Contents/Info.plist" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/Info.plist" if [ -f "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" ]; then \ @@ -239,6 +239,11 @@ fi touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" +install_IDLE4way: install_IDLE + ln -sf "$(INSTALLED_PYTHONAPP)-32" "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python" + sed -e "s!%prefix%!$(prefix)!g" -e 's!%exe%!$(PYTHONFRAMEWORK)-32!g' < "$(srcdir)/IDLE/IDLE.app/Contents/MacOS/IDLE" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/IDLE" + touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" + $(INSTALLED_PYTHONAPP): install_Python installextras: $(srcdir)/Extras.ReadMe.txt $(srcdir)/Extras.install.py