[Python-checkins] cpython (2.7): Issue #18098: The deprecated OS X Build Applet.app fails to build on
ned.deily
python-checkins at python.org
Thu May 30 09:15:00 CEST 2013
http://hg.python.org/cpython/rev/cfdb4598c935
changeset: 83985:cfdb4598c935
branch: 2.7
parent: 83973:bcbad715c2ce
user: Ned Deily <nad at acm.org>
date: Thu May 30 00:14:29 2013 -0700
summary:
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.
files:
Lib/plat-mac/EasyDialogs.py | 9 ++++++++-
Mac/Makefile.in | 25 ++++++++++++++++---------
Mac/README | 8 +++++---
Misc/NEWS | 7 +++++++
configure | 2 +-
configure.ac | 2 +-
6 files changed, 38 insertions(+), 15 deletions(-)
diff --git a/Lib/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py
--- 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
diff --git a/Mac/Makefile.in b/Mac/Makefile.in
--- a/Mac/Makefile.in
+++ b/Mac/Makefile.in
@@ -202,15 +202,22 @@
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
diff --git a/Mac/README b/Mac/README
--- a/Mac/README
+++ b/Mac/README
@@ -209,9 +209,11 @@
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.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,13 @@
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
----
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -2981,6 +2981,7 @@
+ARCH_RUN_32BIT=""
UNIVERSAL_ARCHS="32-bit"
@@ -7996,7 +7997,6 @@
esac
-ARCH_RUN_32BIT=""
case $ac_sys_system/$ac_sys_release in
Darwin/[01567]\..*)
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -145,6 +145,7 @@
AC_SUBST(UNIVERSALSDK)
AC_SUBST(ARCH_RUN_32BIT)
+ARCH_RUN_32BIT=""
UNIVERSAL_ARCHS="32-bit"
AC_SUBST(LIPO_32BIT_FLAGS)
@@ -1801,7 +1802,6 @@
esac
-ARCH_RUN_32BIT=""
AC_SUBST(LIBTOOL_CRUFT)
case $ac_sys_system/$ac_sys_release in
Darwin/@<:@01567@:>@\..*)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list