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.
diff --git a/Lib/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py
index 129cf2c..1d3edb3 100644
--- a/Lib/plat-mac/EasyDialogs.py
+++ b/Lib/plat-mac/EasyDialogs.py
@@ -243,8 +243,15 @@
+# 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.
-screenbounds = Qd.GetQDGlobalsScreenBits().bounds
+try:
+ screenbounds = Qd.GetQDGlobalsScreenBits().bounds
+except AttributeError:
+ raise ImportError("QuickDraw APIs not available")
+
screenbounds = screenbounds[0]+4, screenbounds[1]+4, \
screenbounds[2]-4, screenbounds[3]-4