2 #----------------------------------------------------------------------
3 # Build the MacPython 2.3 extensions for an installation to run
4 # on the pre-installed 2.3 framework build on OSX 10.3
6 # TODO: Parameterize the versions, builddirs, etc...
14 PROGDIR
="`dirname \"$0\"`"
16 x|x.
) PROGDIR
=`pwd` ;;
18 *) echo "Please run with a full pathname"
23 if [ ! -e /usr
/bin
/python
]; then
24 echo "No /usr/bin/python; this script expects to be run on 10.3 only"
31 INSTALLROOT
=$TMPDIR/install
33 RESOURCEDIR
=$PROGDIR/resources.panther
35 PYTHONSRC
=$PROGDIR/..
/..
/..
36 PYTHONOSXDIR
=$PYTHONSRC/Mac
/OSX
37 WASTEDIR
=$PYTHONSRC/..
/waste
40 if [ ! -e $TMPDIR ]; then
47 # Ask the user whether s/he has edited Welcome.txt
48 read -p "Have you updated $RESOURCEDIR/Welcome.txt (Y/n)? " welcome
50 if [ "$welcome" = "n" -o "$welcome" = "N" ]; then
51 echo "Please do so and retry"
55 # Make the installation directories
56 mkdir
-p $INSTALLROOT/Applications
57 mkdir
-p $INSTALLROOT/Library
/Python
/$PYVER
59 # Make a temporary site-packages symlink
60 mkdir
-p $INSTALLROOT/System
/Library
/Frameworks
/Python.framework
/Versions
/2.3/lib
/python2.3
/
61 ln -s $INSTALLROOT/Library
/Python
/$PYVER $INSTALLROOT/System
/Library
/Frameworks
/Python.framework
/Versions
/2.3/lib
/python2.3
/site-packages
65 make -f Makefile.panther DIRMODE
=775 EXEMODE
=775 FILEMODE
=664 DESTDIR
=$INSTALLROOT
67 # Remove the temporary symlink
68 rm -r $INSTALLROOT/System
70 # Unfortunately all the ...MODE arguments above still don't do the trick.
71 # Cop out, and recursively set everything group-writeable.
72 chmod -R ug
+w
$INSTALLROOT
76 # Make the Installer package:
78 # Finally, build the package...
79 rm -rf MacPython-Panther.pkg
80 python
$PYTHONSRC/Mac
/scripts
/buildpkg.py \
81 --Title=MacPython-Panther \
82 --Version=$PYVERSION-$BUILDNUM \
83 --Description="MacPython $PYVERSION tools and additions for Mac OS X 10.3" \
84 --NeedsAuthorization="YES" \
91 # --RootVolumeOnly="YES" \
93 # ...and then make a disk image containing the package.
94 mv MacPython-Panther.pkg
$DMGDIR/root
95 cp $RESOURCEDIR/ReadMe.txt
$DMGDIR/root
/ReadMe.txt
96 $PROGDIR/makedmg
$DMGDIR/root
$DMGDIR MacPython-Panther-
$PYVERSION-$BUILDNUM
98 echo Moving
$DMGDIR/MacPython-Panther-
$PYVERSION-$BUILDNUM to
$DESTDIR
99 if [ ! -e $DESTDIR ]; then
102 mv $DMGDIR/MacPython-Panther-
$PYVERSION-$BUILDNUM.dmg
$DESTDIR
105 # Cleanup build/install dirs
106 if [ $DOCLEANUP = yes ]; then
107 echo "Cleaning up..."
111 echo "Cleanup is disabled. You should remove these dirs when done:"
115 echo "Your installer can be found in $DESTDIR"