]> granicus.if.org Git - python/commitdiff
Issue #15663: Force IDLE.app to run the GUI process in 32-bit mode.
authorNed Deily <nad@acm.org>
Sun, 27 Oct 2013 05:22:07 +0000 (22:22 -0700)
committerNed Deily <nad@acm.org>
Sun, 27 Oct 2013 05:22:07 +0000 (22:22 -0700)
This mitigates the current Aqua Tk refresh problem on OS X 10.9
by backporting 2.7.x behavior and is transparent to the user.

Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py
Mac/Makefile.in

index d6803ba832c8e7a148e00a8f1ddbac78cb44a26c..8b8beb93d0fa736b16488c4e41fd43be9aa7df4d 100644 (file)
@@ -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()
index 354c1fd226489ae469a0450663eecd17c93570d6..5cb664da1c805e0978a7cd4a1c09a9c7b1976a02 100644 (file)
@@ -166,6 +166,10 @@ install_IDLE:
        -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" && rm -rf "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app"
        /bin/cp -PR "$(srcdir)/IDLE/IDLE.app" "$(DESTDIR)$(PYTHONAPPSDIR)"
        ln -sf "$(INSTALLED_PYTHONAPP)" "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python"
+ifneq ($(LIPO_32BIT_FLAGS),)
+       rm "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python"
+       lipo $(LIPO_32BIT_FLAGS) -output "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python" "$(BUILDPYTHON)"
+endif
        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 \