From: Jack Jansen Date: Sun, 31 Aug 2003 23:40:51 +0000 (+0000) Subject: First stab at build script for distribution for Panther. Unfortunately X-Git-Tag: v2.3.1~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8789d3fe1587c778be7c20bcc988eb343662fa67;p=thirdparty%2FPython%2Fcpython.git First stab at build script for distribution for Panther. Unfortunately at the moment it crashes the kernel:-) --- diff --git a/Mac/OSX/Dist/build.panther b/Mac/OSX/Dist/build.panther new file mode 100755 index 000000000000..5e305528cc93 --- /dev/null +++ b/Mac/OSX/Dist/build.panther @@ -0,0 +1,116 @@ +#!/bin/sh -e +#---------------------------------------------------------------------- +# Build the MacPython 2.3 extensions for an installation to run +# on the pre-installed 2.3 framework build on OSX 10.3 + +# TODO: Parameterize the versions, builddirs, etc... + +# Script configs +PYVERSION=2.3 +PYVER=2.3 +BUILDNUM=1 +DOCLEANUP=no + +PROGDIR="`dirname \"$0\"`" +case x$PROGDIR in +x|x.) PROGDIR=`pwd` ;; +x/*) ;; +*) echo "Please run with a full pathname" + exit 1 + ;; +esac + +if [ ! -e /usr/bin/python ]; then + echo "No /usr/bin/python; this script expects to be run on 10.3 only" + exit 1 +fi + +TMPDIR=/tmp/_py +#TMPDIR=/projects/_py + +INSTALLROOT=$TMPDIR/install +DMGDIR=$TMPDIR/dmg +RESOURCEDIR=$PROGDIR/resources.panther +DESTDIR=$TMPDIR/dist +PYTHONSRC=$PROGDIR/../../.. +PYTHONOSXDIR=$PYTHONSRC/Mac/OSX +WASTEDIR=$PYTHONSRC/../waste + +rm -rf $DMGDIR +if [ ! -e $TMPDIR ]; then + mkdir $TMPDIR +fi +chgrp admin $TMPDIR +mkdir -p $DMGDIR/root + + +# Ask the user whether s/he has edited Welcome.txt +read -p "Have you updated $RESOURCEDIR/Welcome.txt (Y/n)? " welcome + +if [ "$welcome" = "n" -o "$welcome" = "N" ]; then + echo "Please do so and retry" + exit +fi + +# Make the installation directories +mkdir -p $INSTALLROOT/Applications +mkdir -p $INSTALLROOT/Library/Python/$PYVER + +# Make a temporary site-packages symlink +mkdir -p $INSTALLROOT/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ +ln -s $INSTALLROOT/Library/Python/$PYVER $INSTALLROOT/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages + +pushd $PYTHONOSXDIR + +make -f Makefile.panther DIRMODE=775 EXEMODE=775 FILEMODE=664 DESTDIR=$INSTALLROOT + +# Remove the temporary symlink +# rm -r $INSTALLROOT/System + +# 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 + +popd + +# Make the Installer package: + +# Finally, build the package... +rm -rf MacPython-Panther.pkg +python $PYTHONSRC/Mac/scripts/buildpkg.py \ + --Title=MacPython-Panther \ + --Version=$PYVERSION-$BUILDNUM \ + --Description="MacPython $PYVERSION tools and additions for Mac OS X 10.3" \ + --NeedsAuthorization="YES" \ + --Relocatable="NO" \ + --InstallOnly="YES" \ + --UseUserMask="NO" \ + $INSTALLROOT \ + $RESOURCEDIR + +# --RootVolumeOnly="YES" \ + +# ...and then make a disk image containing the package. +mv MacPython-Panther.pkg $DMGDIR/root +cp $RESOURCEDIR/ReadMe.txt $DMGDIR/root/ReadMe.txt +$PROGDIR/makedmg $DMGDIR/root $DMGDIR MacPython-Panther-$PYVERSION-$BUILDNUM + +echo Moving $DMGDIR/MacPython-Panther-$PYVERSION-$BUILDNUM to $DESTDIR +if [ ! -e $DESTDIR ]; then + mkdir $DESTDIR +fi +mv $DMGDIR/MacPython-Panther-$PYVERSION-$BUILDNUM.dmg $DESTDIR + + +# Cleanup build/install dirs +if [ $DOCLEANUP = yes ]; then + echo "Cleaning up..." + rm -rf $INSTALLROOT + rm -rf $DMGDIR +else + echo "Cleanup is disabled. You should remove these dirs when done:" + echo " $INSTALLROOT" + echo " $DMGDIR" +fi +echo "Your installer can be found in $DESTDIR" + diff --git a/Mac/OSX/Dist/resources.panther/ReadMe.txt b/Mac/OSX/Dist/resources.panther/ReadMe.txt new file mode 100644 index 000000000000..1edf9bede48a --- /dev/null +++ b/Mac/OSX/Dist/resources.panther/ReadMe.txt @@ -0,0 +1,28 @@ +This package will install MacPython 2.3 for Mac OS X +10.3. + +Installation requires approximately XXX MB of disk +space, ignore the message that it will take zero bytes. + +You must install onto your current boot disk, even +though the installer does not enforce this, otherwise +things will not work. + +This installer does not contain a Python engine, as +Apple already includes that in 10.3. It does contain +a set of programs to allow easy +access to it for Mac users (an integrated development +environment, a Python extension package manager) and +the waste module. + +The installer puts the applications in MacPython-2.3 in +your Applications folder. + +The PythonIDE application has a Help command that gets +you started quickly with MacPython and contains +references to other documentation. + +More information on MacPython can be found at +http://www.cwi.nl/~jack/macpython.html, more +information on Python in general at +http://www.python.org. diff --git a/Mac/OSX/Dist/resources.panther/Welcome.rtf b/Mac/OSX/Dist/resources.panther/Welcome.rtf new file mode 100644 index 000000000000..a2dc1269ce2e --- /dev/null +++ b/Mac/OSX/Dist/resources.panther/Welcome.rtf @@ -0,0 +1,15 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;} +{\colortbl;\red255\green255\blue255;} +\paperw11904\paperh16835\margl1440\margr1440\vieww9920\viewh10660\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural + +\f0\fs24 \cf0 This package will install +\f1\b MacPython 2.3 +\f0\b0 for +\f1\b Mac OS X 10.3 +\f0\b0 . \ +\ +MacPython consists of the programs to allow easy access to Python for Mac users (an integrated development environment, a Python extension package manager), and uses the Python 2.3 interpreter core that comes pre-installed on 10.3.\ +\ +See the ReadMe file for more information.} \ No newline at end of file