From: Jack Jansen Date: Sun, 2 Jan 2005 23:19:40 +0000 (+0000) Subject: Getting things in place for the MacPython additions build 3. X-Git-Tag: v2.3.5c1~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a2784dd3b72193382d50ef0817321321f70000a;p=thirdparty%2FPython%2Fcpython.git Getting things in place for the MacPython additions build 3. --- diff --git a/Mac/OSX/Dist/build.panther b/Mac/OSX/Dist/build.panther index 812b0f59d562..884f08caa060 100755 --- a/Mac/OSX/Dist/build.panther +++ b/Mac/OSX/Dist/build.panther @@ -24,6 +24,11 @@ if [ ! -e /usr/bin/python ]; then echo "No /usr/bin/python; this script expects to be run on 10.3 only" exit 1 fi +vers=`/usr/bin/python -V 2>&1` +if [ "$vers" != "Python 2.3" ]; then + echo "/usr/bin/python is not version 2.3; this script expects to be run on 10.3 only" + exit 1 +fi TMPDIR=/tmp/_py #TMPDIR=/projects/_py @@ -62,11 +67,29 @@ ln -s $INSTALLROOT/Library/Python/$PYVER $INSTALLROOT/System/Library/Frameworks/ pushd $PYTHONOSXDIR +# Check that the Apple Python 2.3 Makefile fixes have been applied on this +# machine +if python fixapplepython23.py -n; then + : +else + echo + echo The additions installer will also install a fix to Apple-installed 2.3 + echo to make building extensions work in the face of other Pythons. + echo But this system needs to have that fix to be able to put it in the installer. + echo + echo Please run $PYTHONOSXDIR/fixapplepython23.py to install the fix. + exit +fi + make -f Makefile.panther DIRMODE=775 EXEMODE=775 FILEMODE=664 DESTDIR=$INSTALLROOT # Remove the temporary symlink rm -r $INSTALLROOT/System +# Install the Makefile fixes +config=System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config +(cd / ; tar cf - $config/Makefile $config/PantherPythonFix) | (cd $INSTALLROOT; tar xf -) + # Unfortunately all the ...MODE arguments above still don't do the trick. # Cop out, and recursively set everything group-writeable. chmod -R ug+w $INSTALLROOT diff --git a/Mac/OSX/Dist/resources.panther/ReadMe.txt b/Mac/OSX/Dist/resources.panther/ReadMe.txt index c660fc8e372b..2866c92c7924 100644 --- a/Mac/OSX/Dist/resources.panther/ReadMe.txt +++ b/Mac/OSX/Dist/resources.panther/ReadMe.txt @@ -1,4 +1,4 @@ -This package will install the third build of +This package will install beta 1 of the third build of the MacPython 2.3 additions for Mac OS X 10.3. Installation requires approximately 3.3 MB of disk @@ -34,6 +34,11 @@ Changes since the second build: - fixed "run with commandline python" to use pythonw. - fixed a crash with very big scripts folders. - fixed the double-scroll problem when you single-clicked. +- Python fixes: + - One fix is made to the Apple-installed Python itself. + As distributed the installation of a newer Python would + cause Apple python to have problems building extensions, + this is fixed. Changes since the first build: - The startup crash of the IDE some people experienced @@ -43,6 +48,6 @@ Changes since the first build: through the Package Manager. More information on MacPython can be found at -http://www.cwi.nl/~jack/macpython.html, more +http://www.cwi.nl/~jack/macpython, more information on Python in general at http://www.python.org. diff --git a/Mac/OSX/Makefile.panther b/Mac/OSX/Makefile.panther index b89ef5d65af2..0cbbcfc88bf9 100644 --- a/Mac/OSX/Makefile.panther +++ b/Mac/OSX/Makefile.panther @@ -2,27 +2,30 @@ # It installs the things that are available in MacPython but that are # ommitted from Apple's installation of Python 2.3. # -all: install_waste install_IDE install_PackageManager install_IDLE \ +all: install_waste install_IDE install_PackageManager \ install_BuildApplet installextras install_PythonLauncher install_pimpupdate +srcdir=../.. VERSION=2.3 DESTDIR= PYTHONAPPSDIR=/Applications/MacPython-$(VERSION) APPLE_prefix=/System/Library/Frameworks/Python.framework/Versions/$(VERSION) -APPLE_PYTHON=/usr/bin/python$(VERSION) +BUILDPYTHON=/usr/bin/python$(VERSION) APPLE_LIBDEST=$(APPLE_prefix)/lib/python$(VERSION) -APPLE_PYTHONW=$(APPLE_prefix)/Resources/Python.app/Contents/MacOS/Python +INSTALLED_PYTHONW=$(APPLE_prefix)/Resources/Python.app/Contents/MacOS/Python APPLE_PYTHONLAUNCHER=$(APPLE_prefix)/Resources/PythonLauncher.app +bundlebuilder=$(srcdir)/Lib/plat-mac/bundlebuilder.py install_waste: - $(APPLE_PYTHON) setup.panther.py install \ + $(BUILDPYTHON) setup.panther.py install \ --prefix=$(APPLE_prefix) --root=/$(DESTDIR) install_IDE: - $(MAKE) -f Makefile install_IDE \ - BUILDPYTHON=$(APPLE_PYTHON) INSTALLED_PYTHONW=$(APPLE_PYTHONW) \ - DESTDIR=$(DESTDIR) PYTHONAPPSDIR=$(PYTHONAPPSDIR) + $(BUILDPYTHON) $(srcdir)/Mac/scripts/BuildApplet.py \ + --python $(INSTALLED_PYTHONW) \ + --output $(DESTDIR)$(PYTHONAPPSDIR)/PythonIDE.app --noargv \ + $(srcdir)/Mac/Tools/IDE/PythonIDE.py # Add the extra files to the resources. This is to work around bugs in # them in the original 2.3. cp ../Tools/IDE/PythonIDEMain.py $(DESTDIR)$(PYTHONAPPSDIR)/PythonIDE.app/Contents/Resources @@ -31,23 +34,24 @@ install_IDE: cp ../Tools/IDE/PyEdit.py $(DESTDIR)$(PYTHONAPPSDIR)/PythonIDE.app/Contents/Resources install_PackageManager: - $(MAKE) -f Makefile install_PackageManager \ - BUILDPYTHON=$(APPLE_PYTHON) INSTALLED_PYTHONW=$(APPLE_PYTHONW) \ - DESTDIR=$(DESTDIR) PYTHONAPPSDIR=$(PYTHONAPPSDIR) - -install_IDLE: - $(MAKE) -f Makefile install_IDLE \ - BUILDPYTHON=$(APPLE_PYTHON) INSTALLED_PYTHONW=$(APPLE_PYTHONW) \ - DESTDIR=$(DESTDIR) PYTHONAPPSDIR=$(PYTHONAPPSDIR) + $(BUILDPYTHON) $(bundlebuilder) \ + --builddir $(DESTDIR)$(PYTHONAPPSDIR)/ \ + --python $(INSTALLED_PYTHONW) \ + --resource $(srcdir)/Mac/Tools/IDE/PythonIDE.rsrc \ + --mainprogram $(srcdir)/Mac/Tools/IDE/PackageManager.py \ + --iconfile $(srcdir)/Mac/Tools/IDE/PackageManager.icns \ + --plist $(srcdir)/Mac/Tools/IDE/PackageManager.plist \ + --creator Pimp build install_BuildApplet: - $(MAKE) -f Makefile install_BuildApplet \ - BUILDPYTHON=$(APPLE_PYTHON) INSTALLED_PYTHONW=$(APPLE_PYTHONW) \ - DESTDIR=$(DESTDIR) PYTHONAPPSDIR=$(PYTHONAPPSDIR) + $(BUILDPYTHON) $(srcdir)/Mac/scripts/BuildApplet.py \ + --python $(INSTALLED_PYTHONW) \ + --output $(DESTDIR)$(PYTHONAPPSDIR)/BuildApplet.app \ + $(srcdir)/Mac/scripts/BuildApplet.py installextras: $(MAKE) -f Makefile installextras \ - BUILDPYTHON=$(APPLE_PYTHON) INSTALLED_PYTHONW=$(APPLE_PYTHONW) \ + BUILDPYTHON=$(BUILDPYTHON) INSTALLED_PYTHONW=$(INSTALLED_PYTHONW) \ DESTDIR=$(DESTDIR) PYTHONAPPSDIR=$(PYTHONAPPSDIR) install_PythonLauncher: