]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #18098: The deprecated OS X Build Applet.app fails to build on
authorNed Deily <nad@acm.org>
Thu, 30 May 2013 07:14:29 +0000 (00:14 -0700)
committerNed Deily <nad@acm.org>
Thu, 30 May 2013 07:14:29 +0000 (00:14 -0700)
OS X 10.8 systems because the Apple-deprecated QuickDraw headers have
been removed from Xcode 4.  Skip building it in this case.

Lib/plat-mac/EasyDialogs.py
Mac/Makefile.in
Mac/README
Misc/NEWS
configure
configure.ac

index 129cf2cae2678b36f8117e2f09c384cfb64a3623..1d3edb3aacde44e308a90def2938c2898bd6d5fc 100644 (file)
@@ -243,8 +243,15 @@ def AskYesNoCancel(question, default = 0, yes=None, no=None, cancel=None, id=262
 
 
 
+# The deprecated Carbon QuickDraw APIs are no longer available as of
+# OS X 10.8.  Raise an ImportError here in that case so that callers
+# of EasyDialogs, like BuildApplet, will do the right thing.
+
+try:
+    screenbounds = Qd.GetQDGlobalsScreenBits().bounds
+except AttributeError:
+    raise ImportError("QuickDraw APIs not available")
 
-screenbounds = Qd.GetQDGlobalsScreenBits().bounds
 screenbounds = screenbounds[0]+4, screenbounds[1]+4, \
     screenbounds[2]-4, screenbounds[3]-4
 
index 6e60b2af3445f16da05f62dc078fd6af46d18758..a3e00b22f91cd210f07a18af73bf77e6448a798f 100644 (file)
@@ -202,15 +202,22 @@ install_IDLE:
        cd IDLE && make install
 
 install_BuildApplet:
-       $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \
-               --destroot "$(DESTDIR)" \
-               --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   
+       if ! $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) \
+                       -c 'import EasyDialogs' 2>/dev/null ; then \
+               echo "EasyDialogs not available in this Python - skipping Build Applet.app" ; \
+       else \
+               $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \
+                       --destroot "$(DESTDIR)" \
+                       --python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \
+                       --output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \
+                       $(srcdir)/scripts/BuildApplet.py && \
+               if [ -n "$(LIPO_32BIT_FLAGS)" ] ; then \
+                       rm "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" && \
+                       lipo $(LIPO_32BIT_FLAGS) \
+                               -output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" \
+                               $(BUILDPYTHON) ; \
+               fi \
+       fi
 
 MACLIBDEST=$(LIBDEST)/plat-mac
 MACTOOLSDEST=$(prefix)/Mac/Tools
index 555b7ca70300675535030e82092acf315bd44707..0a07b5ebc9544c013e1ed64221caa247544de827 100644 (file)
@@ -209,9 +209,11 @@ script to set runtime options. These options can be set once and for all
 through PythonLauncher's preferences dialog.
 
 "BuildApplet.app" creates an applet from a Python script. Drop the script on it
-and out comes a full-featured MacOS application. There is much more to this,
-to be supplied later. Some useful (but outdated) info can be found in
-Mac/Demo.
+and out comes a full-featured MacOS application.  BuildApplet.app is now
+deprecated and has been removed in Python 3.  As of OS X 10.8, Xcode 4 no
+longer supplies the headers for the deprecated QuickDraw APIs used by
+the EasyDialogs module making BuildApplet unusable as an app.  It will
+not be built by the Mac/Makefile in this case.
 
 The commandline scripts /usr/local/bin/python and pythonw can be used to run
 non-GUI and GUI python scripts from the command line, respectively.
index 7e901f7006678aaeef8e63a3c5c531e96f353f98..8804533d7e0325863a96bf54896aacba771bf832 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,13 @@ Library
   the default for linking if LDSHARED is not also overriden.  This restores
   Distutils behavior introduced in 2.7.3 and inadvertently dropped in 2.7.4.
 
+Build
+-----
+
+- Issue #18098: The deprecated OS X Build Applet.app fails to build on
+  OS X 10.8 systems because the Apple-deprecated QuickDraw headers have
+  been removed from Xcode 4.  Skip building it in this case.
+
 IDLE
 ----
 
index dc0dfd04ad1b5b55762958b9542583f672fadc8e..644e76c13fb8893f496f4b06a82186f1519b9f9f 100755 (executable)
--- a/configure
+++ b/configure
@@ -2981,6 +2981,7 @@ fi
 
 
 
+ARCH_RUN_32BIT=""
 
 UNIVERSAL_ARCHS="32-bit"
 
@@ -7996,7 +7997,6 @@ case $ac_sys_system/$ac_sys_release in
 esac
 
 
-ARCH_RUN_32BIT=""
 
 case $ac_sys_system/$ac_sys_release in
   Darwin/[01567]\..*)
index 30f5bf404a37fa1bc2eb38c43ae6f584dbc5497b..4196bc00b25dc7a2f3d949f51b38aac8b7a5b954 100644 (file)
@@ -145,6 +145,7 @@ fi
 AC_SUBST(UNIVERSALSDK)
 
 AC_SUBST(ARCH_RUN_32BIT)
+ARCH_RUN_32BIT=""
 
 UNIVERSAL_ARCHS="32-bit"
 AC_SUBST(LIPO_32BIT_FLAGS)
@@ -1801,7 +1802,6 @@ case $ac_sys_system/$ac_sys_release in
 esac
 
 
-ARCH_RUN_32BIT=""
 AC_SUBST(LIBTOOL_CRUFT)
 case $ac_sys_system/$ac_sys_release in
   Darwin/@<:@01567@:>@\..*)