]> granicus.if.org Git - python/commitdiff
Patch by Tony Lownds: build an IDLE applet too, if _tkinter is available.
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 12 Sep 2002 22:19:23 +0000 (22:19 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 12 Sep 2002 22:19:23 +0000 (22:19 +0000)
I modified the patch to make it a non-fatal error if IDLE isn't built.

Mac/OSX/Makefile

index 7c89a972b6769bc01a0aca2700cf2561a85f0462..b28d9f29388001ea9e6747a7c057f28eda94aac0 100644 (file)
@@ -49,7 +49,7 @@ RESOURCEFILE=python.rsrc
 RFCONVERTER=$(srcdir)/Mac/Lib/applesingle.py
 CACHERSRC=$(srcdir)/Mac/scripts/cachersrc.py
 
-installapps: install_PythonLauncher install_Python install_BuildApplet install_IDE
+installapps: install_PythonLauncher install_Python install_BuildApplet install_IDE install_IDLE
 
 install_PythonLauncher:
        cd $(srcdir)/Mac/OSX/PythonLauncher/PythonLauncher.pbproj ; \
@@ -130,6 +130,26 @@ install_IDE: $(INSTALLED_PYTHONW)
        $(INSTALLED_PYTHONW) $(srcdir)/Mac/scripts/BuildApplet.py \
                --output $(PYTHONAPPSDIR)/PythonIDE.app --noargv \
                $(srcdir)/Mac/Tools/IDE/PythonIDE.py
+
+install_IDLE: $(INSTALLED_PYTHONW)
+       @if ! $(INSTALLED_PYTHONW) -c "import _tkinter"; then \
+               echo IDLE needs the \"Tkinter\" extension module; \
+               echo See Mac/OSX/README for details; \
+       else \
+               echo $(INSTALLED_PYTHONW) $(srcdir)/Mac/scripts/BuildApplet.py \
+                       --output $(PYTHONAPPSDIR)/IDLE.app \
+                       --extra $(srcdir)/Tools/idle \
+                       $(srcdir)/Tools/idle/idle ; \
+               $(INSTALLED_PYTHONW) $(srcdir)/Mac/scripts/BuildApplet.py \
+                       --output $(PYTHONAPPSDIR)/IDLE.app \
+                       --extra $(srcdir)/Tools/idle \
+                       $(srcdir)/Tools/idle/idle ; \
+               echo mv $(PYTHONAPPSDIR)/IDLE.app/Contents/Resources/idle \
+                       $(PYTHONAPPSDIR)/IDLE.app/Contents/Resources/idlelib; \
+               mv $(PYTHONAPPSDIR)/IDLE.app/Contents/Resources/idle \
+                       $(PYTHONAPPSDIR)/IDLE.app/Contents/Resources/idlelib; \
+       fi
+
                
 install_BuildApplet: $(INSTALLED_PYTHONW)
        $(INSTALLED_PYTHONW) $(srcdir)/Mac/scripts/BuildApplet.py \