cpython: cfdb4598c935 (original) (raw)

Mercurial > cpython

changeset 83985:cfdb4598c935 2.7

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. [#18098]

Ned Deily nad@acm.org
date Thu, 30 May 2013 00:14:29 -0700
parents bcbad715c2ce
children 93eb15779050
files Lib/plat-mac/EasyDialogs.py Mac/Makefile.in Mac/README Misc/NEWS configure configure.ac
diffstat 6 files changed, 38 insertions(+), 15 deletions(-)[+] [-] Lib/plat-mac/EasyDialogs.py 9 Mac/Makefile.in 25 Mac/README 8 Misc/NEWS 7 configure 2 configure.ac 2

line wrap: on

line diff

--- a/Lib/plat-mac/EasyDialogs.py +++ b/Lib/plat-mac/EasyDialogs.py @@ -243,8 +243,15 @@ def AskYesNoCancel(question, default = 0 +# 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:

+except AttributeError:

+ screenbounds = screenbounds[0]+4, screenbounds[1]+4, [](#l1.17) screenbounds[2]-4, screenbounds[3]-4

--- a/Mac/Makefile.in +++ b/Mac/Makefile.in @@ -202,15 +202,22 @@ install_IDLE: cd IDLE && make install install_BuildApplet:

-ifneq ($(LIPO_32BIT_FLAGS),) - rm "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" - lipo (LIPO32BITFLAGS)−output"(LIPO_32BIT_FLAGS) -output "(LIPO32BITFLAGS)output"(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" $(BUILDPYTHON) -endif + if ! (RUNSHARED)@ARCHRUN32BIT@(RUNSHARED) @ARCH_RUN_32BIT@ (RUNSHARED)@ARCHRUN32BIT@(BUILDPYTHON) [](#l2.16) + -c 'import EasyDialogs' 2>/dev/null ; then [](#l2.17) + echo "EasyDialogs not available in this Python - skipping Build Applet.app" ; [](#l2.18) + else [](#l2.19) + (RUNSHARED)@ARCHRUN32BIT@(RUNSHARED) @ARCH_RUN_32BIT@ (RUNSHARED)@ARCHRUN32BIT@(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py [](#l2.20) + --destroot "$(DESTDIR)" [](#l2.21) + --python=$(prefix)/Resources/Python.app/Contents/MacOS/Python [](#l2.22) + --output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" [](#l2.23) + $(srcdir)/scripts/BuildApplet.py && [](#l2.24) + if [ -n "$(LIPO_32BIT_FLAGS)" ] ; then [](#l2.25) + rm "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" && [](#l2.26) + lipo $(LIPO_32BIT_FLAGS) [](#l2.27) + -output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" [](#l2.28) + $(BUILDPYTHON) ; [](#l2.29) + fi [](#l2.30) + fi MACLIBDEST=$(LIBDEST)/plat-mac MACTOOLSDEST=$(prefix)/Mac/Tools

--- a/Mac/README +++ b/Mac/README @@ -209,9 +209,11 @@ script to set runtime options. These opt 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.

--- 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

--- a/configure +++ b/configure @@ -2981,6 +2981,7 @@ fi +ARCH_RUN_32BIT="" UNIVERSAL_ARCHS="32-bit" @@ -7996,7 +7997,6 @@ case acsyssystem/ac_sys_system/acsyssystem/ac_sys_release in esac -ARCH_RUN_32BIT="" case acsyssystem/ac_sys_system/acsyssystem/ac_sys_release in Darwin/[01567]..*)

--- a/configure.ac +++ b/configure.ac @@ -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 acsyssystem/ac_sys_system/acsyssystem/ac_sys_release in esac -ARCH_RUN_32BIT="" AC_SUBST(LIBTOOL_CRUFT) case acsyssystem/ac_sys_system/acsyssystem/ac_sys_release in Darwin/@<:@01567@:>@..*)