From: Jack Jansen Date: Sun, 24 Feb 2002 23:03:47 +0000 (+0000) Subject: Backport of 1.5 thru 1.8: X-Git-Tag: v2.2.1c1~175 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b959a83ef916a1b97ab70831fefa3194f9aa0ea;p=thirdparty%2FPython%2Fcpython.git Backport of 1.5 thru 1.8: - Use full paths for Rez and DeRez, which may not be on $PATH. Fixes bug #509074. - Also install the Tools directory on "make installmacsubtree". - Added a note that you have to add Mac/Lib to sys.path after doing a "make installmacsubtree". - Include errors.rsrc in the Python.app resource file, so the error strings are available in MacOS API exceptions. --- diff --git a/Mac/OSX/Makefile b/Mac/OSX/Makefile index 89c934322bea..9fb1420d1f62 100644 --- a/Mac/OSX/Makefile +++ b/Mac/OSX/Makefile @@ -18,6 +18,8 @@ LDFLAGS=-framework System -framework Python -framework Carbon \ -framework Foundation CC=cc LD=cc +REZ=/Developer/Tools/Rez +DEREZ=/Developer/Tools/DeRez OBJECTS=$(PYTHONBUILDDIR)/Mac/Python/macmain.o \ $(PYTHONBUILDDIR)/Mac/Python/macgetargv.o @@ -28,7 +30,7 @@ pythonforbundle: $(OBJECTS) PYTHON=$(PYTHONBUILDDIR)/python.exe APPTEMPLATE=$(PYTHONBUILDDIR)/Mac/OSXResources/app APPSUBDIRS=MacOS Resources Resources/English.lproj -RESOURCEFILE_ASINGLE=$(PYTHONBUILDDIR)/Mac/Resources/dialogs.rsrc +RESOURCEDIR=$(PYTHONBUILDDIR)/Mac/Resources RESOURCEFILE=python.rsrc RFCONVERTER=$(PYTHONBUILDDIR)/Mac/Lib/applesingle.py install: pythonforbundle @@ -71,7 +73,11 @@ install: pythonforbundle done $(INSTALL_PROGRAM) pythonforbundle $(APPINSTALLDIR)/Contents/MacOS/python # Create a temporary version of the resources here - $(PYTHON) $(RFCONVERTER) -r $(RESOURCEFILE_ASINGLE) $(RESOURCEFILE) + $(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/dialogs.rsrc dialogs.rsrc + $(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/errors.rsrc errors.rsrc + $(DEREZ) -useDF -skip ckid dialogs.rsrc > dialogs.r + $(DEREZ) -useDF -skip ckid errors.rsrc > errors.r + $(REZ) -useDF -o $(RESOURCEFILE) dialogs.r errors.r $(INSTALL_DATA) $(RESOURCEFILE) $(APPINSTALLDIR)/Contents/Resources/$(RESOURCEFILE) LIBDEST=$(INSTALLDIR)/Mac/Lib @@ -79,8 +85,11 @@ LIBSRC=$(PYTHONBUILDDIR)/Mac/Lib LIBSUBDIRS=Carbon lib-scriptpackages lib-scriptpackages/CodeWarrior lib-scriptpackages/Explorer \ lib-scriptpackages/Finder lib-scriptpackages/Netscape lib-scriptpackages/StdSuites \ mkcwproject mkcwproject/template mkcwproject/template-carbon mkcwproject/template-ppc +TOOLSDEST=$(INSTALLDIR)/Mac/Tools +TOOLSSRC=$(PYTHONBUILDDIR)/Mac/Tools +TOOLSSUBDIRS=IDE installmacsubtree: - @for i in $(LIBDEST); \ + @for i in $(LIBDEST) $(TOOLSDEST); \ do \ if test ! -d $$i; then \ echo "Creating directory $$i"; \ @@ -133,3 +142,42 @@ installmacsubtree: esac; \ done; \ done + @for d in $(TOOLSSUBDIRS); \ + do \ + a=$(TOOLSSRC)/$$d; \ + if test ! -d $$a; then continue; else true; fi; \ + b=$(TOOLSDEST)/$$d; \ + if test ! -d $$b; then \ + echo "Creating directory $$b"; \ + $(INSTALL) -d -m $(DIRMODE) $$b; \ + else true; \ + fi; \ + done + @for d in $(TOOLSSUBDIRS); \ + do \ + a=$(TOOLSSRC)/$$d; \ + if test ! -d $$a; then continue; else true; fi; \ + b=$(TOOLSDEST)/$$d; \ + for i in $$a/*; \ + do \ + case $$i in \ + *CVS) ;; \ + *.py[co]) ;; \ + *.orig) ;; \ + *~) ;; \ + *) \ + if test -d $$i; then continue; fi; \ + if test -x $$i; then \ + echo $(INSTALL_SCRIPT) $$i $$b; \ + $(INSTALL_SCRIPT) $$i $$b; \ + else \ + echo $(INSTALL_DATA) $$i $$b; \ + $(INSTALL_DATA) $$i $$b; \ + fi;; \ + esac; \ + done; \ + done + + @echo '** Copy the contents of sample_sitecustomize.py (or similar code) into' + @echo '**' $(INSTALLDIR)/lib/python2.2/sitecustomize.py +