[Python-checkins] r46719 - in python/trunk/Mac: Extras.ReadMe.txt Extras.install.py Icons Makefile.in OSX/BuildScript OSX/Doc OSX/Extras.ReadMe.txt OSX/Extras.install.py OSX/IDLE OSX/Icons OSX/Makefile.in OSX/PythonLauncher OSX/README OSX/Tools OSX/fixapplepython23.py OSXResources README Resources

ronald.oussoren python-checkins at python.org
Wed Jun 7 21:02:05 CEST 2006


Author: ronald.oussoren
Date: Wed Jun  7 21:02:03 2006
New Revision: 46719

Added:
   python/trunk/Mac/Extras.ReadMe.txt
      - copied unchanged from r46686, python/trunk/Mac/OSX/Extras.ReadMe.txt
   python/trunk/Mac/Extras.install.py
      - copied unchanged from r46686, python/trunk/Mac/OSX/Extras.install.py
   python/trunk/Mac/Icons/
      - copied from r46686, python/trunk/Mac/OSX/Icons/
   python/trunk/Mac/Makefile.in
      - copied, changed from r46700, python/trunk/Mac/OSX/Makefile.in
   python/trunk/Mac/README
      - copied unchanged from r46686, python/trunk/Mac/OSX/README
   python/trunk/Mac/Resources/
      - copied from r46686, python/trunk/Mac/OSXResources/
Removed:
   python/trunk/Mac/OSX/BuildScript/
   python/trunk/Mac/OSX/Doc/
   python/trunk/Mac/OSX/Extras.ReadMe.txt
   python/trunk/Mac/OSX/Extras.install.py
   python/trunk/Mac/OSX/IDLE/
   python/trunk/Mac/OSX/Icons/
   python/trunk/Mac/OSX/Makefile.in
   python/trunk/Mac/OSX/PythonLauncher/
   python/trunk/Mac/OSX/README
   python/trunk/Mac/OSX/Tools/
   python/trunk/Mac/OSX/fixapplepython23.py
   python/trunk/Mac/OSXResources/
Log:
Move Mac/OSX/* one level up


Copied: python/trunk/Mac/Makefile.in (from r46700, python/trunk/Mac/OSX/Makefile.in)
==============================================================================
--- python/trunk/Mac/OSX/Makefile.in	(original)
+++ python/trunk/Mac/Makefile.in	Wed Jun  7 21:02:03 2006
@@ -3,25 +3,23 @@
 # commandline in that case.
 
 VERSION=@VERSION@
-builddir = ../..
-srcdir = @srcdir@
+builddir = ..
+srcdir=@srcdir@
 prefix=/Library/Frameworks/Python.framework/Versions/$(VERSION)
 LIBDEST=$(prefix)/lib/python$(VERSION)
-BUILDPYTHON=$(builddir)/python.exe
+RUNSHARED=@RUNSHARED@
+BUILDEXE=@BUILDEXEEXT@
+BUILDPYTHON=$(builddir)/python$(BUILDEXE)
 DESTDIR=
-LDFLAGS=        @LDFLAGS@
+LDFLAGS=@LDFLAGS@
 FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@
 
 # These are normally glimpsed from the previous set
-bindir=@exec_prefix@/bin
+bindir=$(prefix)/bin
 PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
 APPINSTALLDIR=$(prefix)/Resources/Python.app
 
 # Variables for installing the "normal" unix binaries
-INSTALLED_PYDOC=$(prefix)/bin/pydoc
-INSTALLED_IDLE=$(prefix)/bin/idle
-INSTALLED_PYTHON=$(prefix)/bin/python
-INSTALLED_PYTHONW=$(prefix)/bin/pythonw
 INSTALLED_PYTHONAPP=$(APPINSTALLDIR)/Contents/MacOS/Python
 
 # Items more-or-less copied from the main Makefile
@@ -36,15 +34,15 @@
 STRIPFLAG=-s
 CPMAC=/Developer/Tools/CpMac
 
-APPTEMPLATE=$(srcdir)/../OSXResources/app
+APPTEMPLATE=$(srcdir)/Resources/app
 APPSUBDIRS=MacOS Resources Resources/English.lproj \
 	Resources/English.lproj/Documentation \
 	Resources/English.lproj/Documentation/doc \
 	Resources/English.lproj/Documentation/ide
-DOCDIR=$(srcdir)/../OSXResources/app/Resources/English.lproj/Documentation
+DOCDIR=$(srcdir)/Resources/app/Resources/English.lproj/Documentation
 DOCINDEX=$(DOCDIR)/"Documentation idx"
-CACHERSRC=$(srcdir)/../scripts/cachersrc.py
-compileall=$(srcdir)/../../Lib/compileall.py
+CACHERSRC=$(srcdir)/scripts/cachersrc.py
+compileall=$(srcdir)/../Lib/compileall.py
 
 installapps: install_Python install_BuildApplet install_PythonLauncher \
 	install_IDLE checkapplepython install_pythonw install_versionedtools
@@ -163,11 +161,11 @@
 	cd IDLE && make install
 
 install_BuildApplet:
-	$(BUILDPYTHON) $(srcdir)/../scripts/BuildApplet.py \
+	$(RUNSHARED) $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \
 		--destroot "$(DESTDIR)" \
 		--python $(INSTALLED_PYTHONAPP) \
 		--output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \
-		$(srcdir)/../scripts/BuildApplet.py
+		$(srcdir)/scripts/BuildApplet.py
 
 MACLIBDEST=$(LIBDEST)/plat-mac
 MACTOOLSDEST=$(prefix)/Mac/Tools
@@ -225,29 +223,25 @@
 	done
 
 
-	$(BUILDPYTHON) $(CACHERSRC) -v $(DESTDIR)$(MACLIBDEST) $(DESTDIR)$(MACTOOLSDEST)
-	$(BUILDPYTHON) -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
-	$(BUILDPYTHON) -O -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
+	$(RUNSHARED) $(BUILDPYTHON) $(CACHERSRC) -v $(DESTDIR)$(MACLIBDEST) $(DESTDIR)$(MACTOOLSDEST)
+	$(RUNSHARED) $(BUILDPYTHON) -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
+	$(RUNSHARED) $(BUILDPYTHON) -O -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
 
-#
-# We use the full name here in stead of $(INSTALLED_PYTHONAPP), because
-# the latter may be overridden by Makefile.jaguar when building for a pre-installed
-$(APPINSTALLDIR)/Contents/MacOS/Python: install_Python
-
-# $(INSTALLED_PYTHON) has to be done by the main Makefile, we cannot do that here.
-# At least this rule will give an error if it doesn't exist.
+$(INSTALLED_PYTHONAPP): install_Python
 
-installextras:
+installextras: $(srcdir)/Extras.ReadMe.txt $(srcdir)/Extras.install.py
 	$(INSTALL) -d "$(DESTDIR)$(PYTHONAPPSDIR)/Extras"
-	$(INSTALL) $(srcdir)/Mac/OSX/Extras.ReadMe.txt "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/ReadMe.txt"
-	$(BUILDPYTHON) $(srcdir)/Mac/OSX/Extras.install.py $(srcdir)/Demo \
+	$(INSTALL) $(srcdir)/Extras.ReadMe.txt "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/ReadMe.txt"
+	$(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/../Demo \
 		"$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo"
+	$(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/Demo \
+		"$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo.Mac"
 
 
-checkapplepython:
-	@if ! $(BUILDPYTHON) $(srcdir)/fixapplepython23.py -n; then \
+checkapplepython: $(srcdir)/Tools/fixapplepython23.py
+	@if ! $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Tools/fixapplepython23.py -n; then \
 		echo "* WARNING: Apple-installed Python 2.3 will have trouble building extensions from now on."; \
-		echo "* WARNING: Run $(srcdir)/fixapplepython23.py with \"sudo\" to fix this."; \
+		echo "* WARNING: Run $(srcdir)/Tools/fixapplepython23.py with \"sudo\" to fix this."; \
 	fi
 
 
@@ -255,5 +249,3 @@
 	rm pythonw
 	cd PythonLauncher && make clean
 	cd IDLE && make clean
-
-

Deleted: /python/trunk/Mac/OSX/Extras.ReadMe.txt
==============================================================================
--- /python/trunk/Mac/OSX/Extras.ReadMe.txt	Wed Jun  7 21:02:03 2006
+++ (empty file)
@@ -1,5 +0,0 @@
-This folder contains examples of Python usage and useful scripts and tools.
-
-You should be aware that these are not Macintosh-specific but are shared
-among Python on all platforms, so there are some that only run on Windows
-or Unix or another platform, and/or make little sense on a Macintosh.

Deleted: /python/trunk/Mac/OSX/Extras.install.py
==============================================================================
--- /python/trunk/Mac/OSX/Extras.install.py	Wed Jun  7 21:02:03 2006
+++ (empty file)
@@ -1,54 +0,0 @@
-"""Recursively copy a directory but skip undesired files and
-directories (CVS, backup files, pyc files, etc)"""
-
-import sys
-import os
-import shutil
-
-verbose = 1
-debug = 0
-
-def isclean(name):
-    if name == 'CVS': return 0
-    if name == '.cvsignore': return 0
-    if name == '.DS_store': return 0
-    if name == '.svn': return 0
-    if name.endswith('~'): return 0
-    if name.endswith('.BAK'): return 0
-    if name.endswith('.pyc'): return 0
-    if name.endswith('.pyo'): return 0
-    if name.endswith('.orig'): return 0
-    return 1
-
-def copycleandir(src, dst):
-    for cursrc, dirs, files in os.walk(src):
-        assert cursrc.startswith(src)
-        curdst = dst + cursrc[len(src):]
-        if verbose:
-            print "mkdir", curdst
-        if not debug:
-            if not os.path.exists(curdst):
-                os.makedirs(curdst)
-        for fn in files:
-            if isclean(fn):
-                if verbose:
-                    print "copy", os.path.join(cursrc, fn), os.path.join(curdst, fn)
-                if not debug:
-                    shutil.copy2(os.path.join(cursrc, fn), os.path.join(curdst, fn))
-            else:
-                if verbose:
-                    print "skipfile", os.path.join(cursrc, fn)
-        for i in range(len(dirs)-1, -1, -1):
-            if not isclean(dirs[i]):
-                if verbose:
-                    print "skipdir", os.path.join(cursrc, dirs[i])
-                del dirs[i]
-
-def main():
-    if len(sys.argv) != 3:
-        sys.stderr.write("Usage: %s srcdir dstdir\n" % sys.argv[0])
-        sys.exit(1)
-    copycleandir(sys.argv[1], sys.argv[2])
-
-if __name__ == '__main__':
-    main()

Deleted: /python/trunk/Mac/OSX/Makefile.in
==============================================================================
--- /python/trunk/Mac/OSX/Makefile.in	Wed Jun  7 21:02:03 2006
+++ (empty file)
@@ -1,259 +0,0 @@
-# This file can be invoked from the various frameworkinstall... targets in the 
-# main Makefile. The next couple of variables are overridden on the 
-# commandline in that case.
-
-VERSION=@VERSION@
-builddir = ../..
-srcdir = @srcdir@
-prefix=/Library/Frameworks/Python.framework/Versions/$(VERSION)
-LIBDEST=$(prefix)/lib/python$(VERSION)
-BUILDPYTHON=$(builddir)/python.exe
-DESTDIR=
-LDFLAGS=        @LDFLAGS@
-FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@
-
-# These are normally glimpsed from the previous set
-bindir=@exec_prefix@/bin
-PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
-APPINSTALLDIR=$(prefix)/Resources/Python.app
-
-# Variables for installing the "normal" unix binaries
-INSTALLED_PYDOC=$(prefix)/bin/pydoc
-INSTALLED_IDLE=$(prefix)/bin/idle
-INSTALLED_PYTHON=$(prefix)/bin/python
-INSTALLED_PYTHONW=$(prefix)/bin/pythonw
-INSTALLED_PYTHONAPP=$(APPINSTALLDIR)/Contents/MacOS/Python
-
-# Items more-or-less copied from the main Makefile
-DIRMODE=755
-FILEMODE=644
-INSTALL=@INSTALL@
-INSTALL_SYMLINK=ln -fsn
-INSTALL_PROGRAM=@INSTALL_PROGRAM@
-INSTALL_SCRIPT= @INSTALL_SCRIPT@
-INSTALL_DATA=@INSTALL_DATA@
-LN=@LN@
-STRIPFLAG=-s
-CPMAC=/Developer/Tools/CpMac
-
-APPTEMPLATE=$(srcdir)/../OSXResources/app
-APPSUBDIRS=MacOS Resources Resources/English.lproj \
-	Resources/English.lproj/Documentation \
-	Resources/English.lproj/Documentation/doc \
-	Resources/English.lproj/Documentation/ide
-DOCDIR=$(srcdir)/../OSXResources/app/Resources/English.lproj/Documentation
-DOCINDEX=$(DOCDIR)/"Documentation idx"
-CACHERSRC=$(srcdir)/../scripts/cachersrc.py
-compileall=$(srcdir)/../../Lib/compileall.py
-
-installapps: install_Python install_BuildApplet install_PythonLauncher \
-	install_IDLE checkapplepython install_pythonw install_versionedtools
-
-install_pythonw: pythonw
-	$(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)"
-	$(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)"
-	ln -sf python$(VERSION) "$(DESTDIR)$(prefix)/bin/python"
-	ln -sf pythonw$(VERSION) "$(DESTDIR)$(prefix)/bin/pythonw"
-
-#
-# Install unix tools in /usr/local/bin. These are just aliases for the 
-# actual installation inside the framework.
-#
-installunixtools:
-	if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then  \
-		$(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\
-	fi
-	for fn in python pythonw idle pydoc python-config smtpd.py   \
-		  python$(VERSION) pythonw$(VERSION) idle$(VERSION) \
-		  pydoc$(VERSION) python-config$(VERSION) smtpd$(VERSION).py ;\
-	do \
-		ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
-	done
-
-#
-# Like installunixtools, but only install links to the versioned binaries.
-#
-altinstallunixtools:
-	if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then  \
-		$(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\
-	fi
-	for fn in python$(VERSION) pythonw$(VERSION) idle$(VERSION) \
-		  pydoc$(VERSION) python-config$(VERSION) smtpd$(VERSION).py ;\
-	do \
-		ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
-	done
-
-
-# By default most tools are installed without a version in their basename, to
-# make it easier to install (and use) several python versions side-by-side move
-# the tools to a version-specific name and add the non-versioned name as an
-# alias.
-install_versionedtools:
-	for fn in idle pydoc python-config ;\
-	do \
-		if [ -h "$(DESTDIR)$(prefix)/bin/$${fn}" ]; then \
-			continue ;\
-		fi ;\
-		mv "$(DESTDIR)$(prefix)/bin/$${fn}" "$(DESTDIR)$(prefix)/bin/$${fn}$(VERSION)"  ;\
-		ln -sf "$${fn}$(VERSION)" "$(DESTDIR)$(prefix)/bin/$${fn}" ;\
-	done
-	if [ ! -h "$(DESTDIR)$(prefix)/bin/smtpd.py" ]; then \
-		mv "$(DESTDIR)$(prefix)/bin/smtpd.py" "$(DESTDIR)$(prefix)/bin/smtpd$(VERSION).py"  ;\
-		ln -sf "smtpd$(VERSION).py" "$(DESTDIR)$(prefix)/bin/smtpd.py" ;\
-	fi
-
-
-pythonw: $(srcdir)/Tools/pythonw.c
-	$(CC) $(LDFLAGS) -o $@ $(srcdir)/Tools/pythonw.c \
-		-DPYTHONWEXECUTABLE='"$(APPINSTALLDIR)/Contents/MacOS/Python"'
-
-
-install_PythonLauncher:
-	cd PythonLauncher && make install DESTDIR=$(DESTDIR)
-
-install_Python:
-	@if test ! -f $(DOCINDEX); then \
-		echo WARNING: you should run Apple Help Indexing Tool on $(DOCDIR); \
-	fi
-	@for i in "$(PYTHONAPPSDIR)" "$(APPINSTALLDIR)" "$(APPINSTALLDIR)/Contents"; do \
-		if test ! -d "$(DESTDIR)$$i"; then \
-			echo "Creating directory $(DESTDIR)$$i"; \
-			$(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$$i"; \
-		fi;\
-	done
-	@for i in $(APPSUBDIRS); do \
-		if test ! -d "$(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; then \
-			echo "Creating directory $(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; \
-			$(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; \
-		else	true; \
-		fi; \
-	done
-	@for d in . $(APPSUBDIRS); \
-	do \
-		a=$(APPTEMPLATE)/$$d; \
-		if test ! -d $$a; then continue; else true; fi; \
-		b="$(DESTDIR)$(APPINSTALLDIR)/Contents/$$d"; \
-		for i in $$a/*; \
-		do \
-			case $$i in \
-			*CVS) ;; \
-			*.svn) ;; \
-			*.py[co]) ;; \
-			*.orig) ;; \
-			*~) ;; \
-			*idx) \
-				echo $(CPMAC) "$$i" $$b; \
-				$(CPMAC) "$$i" "$$b"; \
-				;; \
-			*) \
-				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
-	$(INSTALL_PROGRAM) $(STRIPFLAG) $(BUILDPYTHON) "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/Python"
-
-install_IDLE:
-	cd IDLE && make install
-
-install_BuildApplet:
-	$(BUILDPYTHON) $(srcdir)/../scripts/BuildApplet.py \
-		--destroot "$(DESTDIR)" \
-		--python $(INSTALLED_PYTHONAPP) \
-		--output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \
-		$(srcdir)/../scripts/BuildApplet.py
-
-MACLIBDEST=$(LIBDEST)/plat-mac
-MACTOOLSDEST=$(prefix)/Mac/Tools
-MACTOOLSSRC=$(srcdir)/Mac/Tools
-MACTOOLSSUBDIRS=IDE
-
-installmacsubtree:
-	@for i in $(MACTOOLSDEST); \
-	do \
-		if test ! -d $(DESTDIR)$$i; then \
-			echo "Creating directory $(DESTDIR)$$i"; \
-			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
-		else	true; \
-		fi; \
-	done
-	@for d in $(MACTOOLSSUBDIRS); \
-	do \
-		a=$(MACTOOLSSRC)/$$d; \
-		if test ! -d $$a; then continue; else true; fi; \
-		b=$(DESTDIR)$(MACTOOLSDEST)/$$d; \
-		if test ! -d $$b; then \
-			echo "Creating directory $$b"; \
-			$(INSTALL) -d -m $(DIRMODE) $$b; \
-		else	true; \
-		fi; \
-	done
-	@for d in $(MACTOOLSSUBDIRS); \
-	do \
-		a=$(MACTOOLSSRC)/$$d; \
-		if test ! -d $$a; then continue; else true; fi; \
-		b=$(DESTDIR)$(MACTOOLSDEST)/$$d; \
-		for i in $$a/*; \
-		do \
-			case $$i in \
-			*CVS) ;; \
-			*.svn) ;; \
-			*.py[co]) ;; \
-			*.orig) ;; \
-			*~) ;; \
-			*.rsrc) \
-				echo $(CPMAC) $$i $$b ; \
-				$(CPMAC) $$i $$b ; \
-				;; \
-			*) \
-				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
-
-
-	$(BUILDPYTHON) $(CACHERSRC) -v $(DESTDIR)$(MACLIBDEST) $(DESTDIR)$(MACTOOLSDEST)
-	$(BUILDPYTHON) -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
-	$(BUILDPYTHON) -O -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
-
-#
-# We use the full name here in stead of $(INSTALLED_PYTHONAPP), because
-# the latter may be overridden by Makefile.jaguar when building for a pre-installed
-$(APPINSTALLDIR)/Contents/MacOS/Python: install_Python
-
-# $(INSTALLED_PYTHON) has to be done by the main Makefile, we cannot do that here.
-# At least this rule will give an error if it doesn't exist.
-
-installextras:
-	$(INSTALL) -d "$(DESTDIR)$(PYTHONAPPSDIR)/Extras"
-	$(INSTALL) $(srcdir)/Mac/OSX/Extras.ReadMe.txt "$(DESTDIR)$(PYTHONAPPSDIR)/Extras/ReadMe.txt"
-	$(BUILDPYTHON) $(srcdir)/Mac/OSX/Extras.install.py $(srcdir)/Demo \
-		"$(DESTDIR)$(PYTHONAPPSDIR)/Extras/Demo"
-
-
-checkapplepython:
-	@if ! $(BUILDPYTHON) $(srcdir)/fixapplepython23.py -n; then \
-		echo "* WARNING: Apple-installed Python 2.3 will have trouble building extensions from now on."; \
-		echo "* WARNING: Run $(srcdir)/fixapplepython23.py with \"sudo\" to fix this."; \
-	fi
-
-
-clean:
-	rm pythonw
-	cd PythonLauncher && make clean
-	cd IDLE && make clean
-
-

Deleted: /python/trunk/Mac/OSX/README
==============================================================================
--- /python/trunk/Mac/OSX/README	Wed Jun  7 21:02:03 2006
+++ (empty file)
@@ -1,167 +0,0 @@
-============
-MacOSX Notes
-============
-
-This document provides a quick overview of some Mac OS X specific features in
-the Python distribution.
-
-
-Building and using a universal binary of Python on Mac OS X
-===========================================================
-
-1. What is a universal binary
------------------------------
-
-A universal binary build of Python contains object code for both PPC and i386
-and can therefore run at native speed on both classic powerpc based macs and
-the newer intel based macs.
-
-2. How do I build a universal binary
-------------------------------------
-
-You can enable universal binaries by specifying the "--enable-universalsdk"
-flag to configure::
-
-  $ ./configure --enable-universalsdk
-  $ make
-  $ make install
-
-This flag can be used a framework build of python, but also with a classic
-unix build. Either way you will have to build python on Mac OS X 10.4 (or later)
-with Xcode 2.1 (or later). You also have to install the 10.4u SDK when 
-installing Xcode.
-
-
-Building and using a framework-based Python on Mac OS X.
-========================================================
-
-
-1. Why would I want a framework Python instead of a normal static Python?
---------------------------------------------------------------------------
-
-The main reason is because you want to create GUI programs in Python. With the
-exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run 
-from a fullblown MacOSX application (a ".app" bundle).
-
-While it is technically possible to create a .app without using frameworks you
-will have to do the work yourself if you really want this.
-
-A second reason for using frameworks is that they put Python-related items in
-only two places: "/Library/Framework/Python.framework" and 
-"/Applications/MacPython 2.5".  This simplifies matters for users installing 
-Python from a binary distribution if they want to get rid of it again. Moreover,
-due to the way frameworks work a user without admin privileges can install a 
-binary distribution in his or her home directory without recompilation.
-
-2. How does a framework Python differ from a normal static Python?
-------------------------------------------------------------------
-
-In everyday use there is no difference, except that things are stored in
-a different place. If you look in /Library/Frameworks/Python.framework
-you will see lots of relative symlinks, see the Apple documentation for
-details. If you are used to a normal unix Python file layout go down to
-Versions/Current and you will see the familiar bin and lib directories.
-
-3. Do I need extra packages?
-----------------------------
-
-Yes, probably.  If you want Tkinter support you need to get the OSX AquaTk 
-distribution, this is installed by default on Mac OS X 10.4 or later. If
-you want wxPython you need to get that. If you want Cocoa you need to get
-PyObjC. 
-
-4. How do I build a framework Python?
--------------------------------------
-
-This directory contains a Makefile that will create a couple of python-related
-applications (fullblown OSX .app applications, that is) in
-"/Applications/MacPython 2.3", and a hidden helper application Python.app 
-inside the Python.framework, and unix tools "python" and "pythonw" into 
-/usr/local/bin.  In addition it has a target "installmacsubtree" that installs 
-the relevant portions of the Mac subtree into the Python.framework.
-
-It is normally invoked indirectly through the main Makefile, as the last step
-in the sequence
-
- 1. ./configure --enable-framework
-
- 2. make
- 
- 3. make install
-
-This sequence will put the framework in /Library/Framework/Python.framework,
-the applications in /Applications/MacPython 2.5 and the unix tools in 
-/usr/local/bin.
-
-Installing in another place, for instance $HOME/Library/Frameworks if you have
-no admin privileges on your machine, has only been tested very lightly. This
-can be done by configuring with --enable-framework=$HOME/Library/Frameworks.
-The other two directories, /Applications/MacPython-2.3 and /usr/local/bin, will 
-then also be deposited in $HOME. This is sub-optimal for the unix tools, which 
-you would want in $HOME/bin, but there is no easy way to fix this right now.
-
-Note that there are no references to the actual locations in the code or
-resource files, so you are free to move things around afterwards. For example,
-you could use --enable-framework=/tmp/newversion/Library/Frameworks and use
-/tmp/newversion as the basis for an installer or something.
-
-If you want to install some part, but not all, read the main Makefile. The
-frameworkinstall is composed of a couple of sub-targets that install the
-framework itself, the Mac subtree, the applications and the unix tools.
-
-There is an extra target frameworkinstallextras that is not part of the
-normal frameworkinstall which installs the Demo and Tools directories
-into /Applications/MacPython-2.3, this is useful for binary distributions.
-
-What do all these programs do?
-===============================
-
-"IDLE.app" is an integrated development environment for Python: editor,
-debugger, etc.
-
-"PythonLauncher.app" is a helper application that will handle things when you
-double-click a .py, .pyc or .pyw file. For the first two it creates a Terminal
-window and runs the scripts with the normal command-line Python. For the
-latter it runs the script in the Python.app interpreter so the script can do
-GUI-things. Keep the "alt" key depressed while dragging or double-clicking a
-script to set runtime options. These options can be set once and for all
-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.
-
-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.
-
-How do I create a binary distribution?
-======================================
-
-Go to the directory "Mac/OSX/BuildScript". There you'll find a script 
-"build-installer.py" that does all the work. This will download and build
-a number of 3th-party libaries, configures and builds a framework Python,
-installs it, creates the installer pacakge files and then packs this in a 
-DMG image.
-
-The script will build a universal binary, you'll therefore have to run this
-script on Mac OS X 10.4 or later and with Xcode 2.1 or later installed.
-
-All of this is normally done completely isolated in /tmp/_py, so it does not
-use your normal build directory nor does it install into /.
-
-Because of the way the script locates the files it needs you have to run it
-from within the BuildScript directory. The script accepts a number of 
-command-line arguments, run it with --help for more information.
-
-Odds and ends
-=============
-
-Something to take note of is that the ".rsrc" files in the distribution are
-not actually resource files, they're AppleSingle encoded resource files. The
-macresource module and the Mac/OSX/Makefile cater for this, and create
-".rsrc.df.rsrc" files on the fly that are normal datafork-based resource
-files.
-
-	Jack Jansen, Jack.Jansen at cwi.nl, 15-Jul-2004.
-	Ronald Oussoren, RonaldOussoren at mac.com, 26-May-2006

Deleted: /python/trunk/Mac/OSX/fixapplepython23.py
==============================================================================
--- /python/trunk/Mac/OSX/fixapplepython23.py	Wed Jun  7 21:02:03 2006
+++ (empty file)
@@ -1,118 +0,0 @@
-"""fixapplepython23 - Fix Apple-installed Python 2.3 (on Mac OS X 10.3)
-
-Python 2.3 (and 2.3.X for X<5) have the problem that building an extension
-for a framework installation may accidentally pick up the framework
-of a newer Python, in stead of the one that was used to build the extension.
-
-This script modifies the Makefile (in .../lib/python2.3/config) to use
-the newer method of linking extensions with "-undefined dynamic_lookup"
-which fixes this problem.
-
-The script will first check all prerequisites, and return a zero exit
-status also when nothing needs to be fixed.
-"""
-import sys
-import os
-import gestalt
-
-MAKEFILE='/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/Makefile'
-CHANGES=((
-    'LDSHARED=\t$(CC) $(LDFLAGS) -bundle -framework $(PYTHONFRAMEWORK)\n',
-    'LDSHARED=\t$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup\n'
-    ),(
-    'BLDSHARED=\t$(CC) $(LDFLAGS) -bundle -framework $(PYTHONFRAMEWORK)\n',
-    'BLDSHARED=\t$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup\n'
-    ),(
-    'CC=\t\tgcc\n',
-    'CC=\t\t/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/PantherPythonFix/run-gcc\n'
-    ),(
-    'CXX=\t\tc++\n',
-    'CXX=\t\t/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/PantherPythonFix/run-g++\n'
-))
-
-GCC_SCRIPT='/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/PantherPythonFix/run-gcc'
-GXX_SCRIPT='/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/PantherPythonFix/run-g++'
-SCRIPT="""#!/bin/sh
-export MACOSX_DEPLOYMENT_TARGET=10.3
-exec %s "${@}"
-"""
-
-def findline(lines, start):
-    """return line starting with given string or -1"""
-    for i in range(len(lines)):
-        if lines[i][:len(start)] == start:
-            return i
-    return -1
-
-def fix(makefile, do_apply):
-    """Fix the Makefile, if required."""
-    fixed = False
-    lines = open(makefile).readlines()
-
-    for old, new in CHANGES:
-        i = findline(lines, new)
-        if i >= 0:
-            # Already fixed
-            continue
-        i = findline(lines, old)
-        if i < 0:
-            print 'fixapplepython23: Python installation not fixed (appears broken)'
-            print 'fixapplepython23: missing line:', old
-            return 2
-        lines[i] = new
-        fixed = True
-
-    if fixed:
-        if do_apply:
-            print 'fixapplepython23: Fix to Apple-installed Python 2.3 applied'
-            os.rename(makefile, makefile + '~')
-            open(makefile, 'w').writelines(lines)
-            return 0
-        else:
-            print 'fixapplepython23: Fix to Apple-installed Python 2.3 should be applied'
-            return 1
-    else:
-        print 'fixapplepython23: No fix needed, appears to have been applied before'
-        return 0
-
-def makescript(filename, compiler):
-    """Create a wrapper script for a compiler"""
-    dirname = os.path.split(filename)[0]
-    if not os.access(dirname, os.X_OK):
-        os.mkdir(dirname, 0755)
-    fp = open(filename, 'w')
-    fp.write(SCRIPT % compiler)
-    fp.close()
-    os.chmod(filename, 0755)
-    print 'fixapplepython23: Created', filename
-
-def main():
-    # Check for -n option
-    if len(sys.argv) > 1 and sys.argv[1] == '-n':
-        do_apply = False
-    else:
-        do_apply = True
-    # First check OS version
-    if gestalt.gestalt('sysv') < 0x1030:
-        print 'fixapplepython23: no fix needed on MacOSX < 10.3'
-        sys.exit(0)
-    # Test that a framework Python is indeed installed
-    if not os.path.exists(MAKEFILE):
-        print 'fixapplepython23: Python framework does not appear to be installed (?), nothing fixed'
-        sys.exit(0)
-    # Check that we can actually write the file
-    if do_apply and not os.access(MAKEFILE, os.W_OK):
-        print 'fixapplepython23: No write permission, please run with "sudo"'
-        sys.exit(2)
-    # Create the shell scripts
-    if do_apply:
-        if not os.access(GCC_SCRIPT, os.X_OK):
-            makescript(GCC_SCRIPT, "gcc")
-        if not os.access(GXX_SCRIPT, os.X_OK):
-            makescript(GXX_SCRIPT, "g++")
-    #  Finally fix the makefile
-    rv = fix(MAKEFILE, do_apply)
-    sys.exit(rv)
-
-if __name__ == '__main__':
-    main()


More information about the Python-checkins mailing list