Commit 51b6a984 authored by Ned Deily's avatar Ned Deily

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.
parent aac6957f
...@@ -243,8 +243,15 @@ def AskYesNoCancel(question, default = 0, yes=None, no=None, cancel=None, id=262 ...@@ -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 = screenbounds[0]+4, screenbounds[1]+4, \
screenbounds[2]-4, screenbounds[3]-4 screenbounds[2]-4, screenbounds[3]-4
......
...@@ -202,15 +202,22 @@ install_IDLE: ...@@ -202,15 +202,22 @@ install_IDLE:
cd IDLE && make install cd IDLE && make install
install_BuildApplet: install_BuildApplet:
$(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \ if ! $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) \
--destroot "$(DESTDIR)" \ -c 'import EasyDialogs' 2>/dev/null ; then \
--python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \ echo "EasyDialogs not available in this Python - skipping Build Applet.app" ; \
--output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \ else \
$(srcdir)/scripts/BuildApplet.py $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \
ifneq ($(LIPO_32BIT_FLAGS),) --destroot "$(DESTDIR)" \
rm "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" --python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \
lipo $(LIPO_32BIT_FLAGS) -output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app/Contents/MacOS/Python" $(BUILDPYTHON) --output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \
endif $(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 MACLIBDEST=$(LIBDEST)/plat-mac
MACTOOLSDEST=$(prefix)/Mac/Tools MACTOOLSDEST=$(prefix)/Mac/Tools
......
...@@ -209,9 +209,11 @@ script to set runtime options. These options can be set once and for all ...@@ -209,9 +209,11 @@ script to set runtime options. These options can be set once and for all
through PythonLauncher's preferences dialog. through PythonLauncher's preferences dialog.
"BuildApplet.app" creates an applet from a Python script. Drop the script on it "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, and out comes a full-featured MacOS application. BuildApplet.app is now
to be supplied later. Some useful (but outdated) info can be found in deprecated and has been removed in Python 3. As of OS X 10.8, Xcode 4 no
Mac/Demo. 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 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. non-GUI and GUI python scripts from the command line, respectively.
......
...@@ -37,6 +37,13 @@ Library ...@@ -37,6 +37,13 @@ Library
the default for linking if LDSHARED is not also overriden. This restores 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. 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 IDLE
---- ----
......
...@@ -2981,6 +2981,7 @@ fi ...@@ -2981,6 +2981,7 @@ fi
ARCH_RUN_32BIT=""
UNIVERSAL_ARCHS="32-bit" UNIVERSAL_ARCHS="32-bit"
...@@ -7996,7 +7997,6 @@ case $ac_sys_system/$ac_sys_release in ...@@ -7996,7 +7997,6 @@ case $ac_sys_system/$ac_sys_release in
esac esac
ARCH_RUN_32BIT=""
case $ac_sys_system/$ac_sys_release in case $ac_sys_system/$ac_sys_release in
Darwin/[01567]\..*) Darwin/[01567]\..*)
......
...@@ -145,6 +145,7 @@ fi ...@@ -145,6 +145,7 @@ fi
AC_SUBST(UNIVERSALSDK) AC_SUBST(UNIVERSALSDK)
AC_SUBST(ARCH_RUN_32BIT) AC_SUBST(ARCH_RUN_32BIT)
ARCH_RUN_32BIT=""
UNIVERSAL_ARCHS="32-bit" UNIVERSAL_ARCHS="32-bit"
AC_SUBST(LIPO_32BIT_FLAGS) AC_SUBST(LIPO_32BIT_FLAGS)
...@@ -1801,7 +1802,6 @@ case $ac_sys_system/$ac_sys_release in ...@@ -1801,7 +1802,6 @@ case $ac_sys_system/$ac_sys_release in
esac esac
ARCH_RUN_32BIT=""
AC_SUBST(LIBTOOL_CRUFT) AC_SUBST(LIBTOOL_CRUFT)
case $ac_sys_system/$ac_sys_release in case $ac_sys_system/$ac_sys_release in
Darwin/@<:@01567@:>@\..*) Darwin/@<:@01567@:>@\..*)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment