]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/mac/MacPython/build
2 #----------------------------------------------------------------------
3 # Build MacPython 2.3 and make an Installer package of it
5 # TODO: Parameterize the versions, builddirs, etc...
13 PROGDIR
="`dirname \"$0\"`"
17 BUILDROOT
=$TMPDIR/build
18 INSTALLROOT
=$TMPDIR/install
20 RESOURCEDIR
=$PROGDIR/resources
21 DESTDIR
=/projects
/wx
/wxPython
/dist
22 PYTHONSRC
=/projects
/Python
-$PYVERSION
23 WASTEDIR
=/projects
/waste
32 # Configure and build Python
35 # Check if we should build and install the docs, but only if it
36 # doesn't appear to be done already. TODO: fix this path to be version independent
37 if [ ! -e "build/temp.darwin-6.3-Power Macintosh-2.3/build-html/build-html idx" ]; then
38 read -p "Build the Python docs? (y/N)? " builddocs
41 # If the filesystem is case-sensitive then "python" will be built, but
42 # some parts of the install expect "python.exe which is what is built
43 # on a case-insensitive filesystem. Make a link just in case it is
45 if [ ! -e python.exe
]; then
46 ln -s python python.exe
49 # Make a link to the waste dir so that lib can be found. This allows
50 # the PythonIDE to be built
51 if [ ! -e waste
]; then
55 $PYTHONSRC/configure
--enable-framework=$INSTALLROOT/Library
/Frameworks LDFLAGS
=-Wl,-x
59 if [ "$builddocs" = "y" -o "$builddocs" = "Y" ]; then
60 .
/python.exe
$PYTHONSRC/Mac
/OSX
/setupDocs.py build
62 read -p "When the help indexer is done press Enter..." ans
63 .
/python.exe
$PYTHONSRC/Mac
/OSX
/setupDocs.py
install \
64 --prefix=$INSTALLROOT/Library
/Frameworks
/Python.framework
/Versions
/$PYVER
71 # Make the Installer package:
72 # First, remove the unix tools as their paths will be wrong. We'll recreate
73 # them in the postinstall.
74 rm -r $INSTALLROOT/usr
76 # Next, remove the .pyc/.pyo files
77 python
$PROGDIR/..
/zappycfiles.py
$INSTALLROOT/Library
/Frameworks
/Python.framework
/Versions
/$PYVER/lib
/python
$PYVER
79 # Make the welcome message
80 cat > $RESOURCEDIR/Welcome.txt
<<EOF
83 This program will install Python $PYVERSION for Mac OS X as a Framework.
85 Build number: $BUILDNUM
90 # fix a bug in the IDLE install
91 IDLERES
=$INSTALLROOT/Applications
/MacPython
-2.3
/IDLE.app
/Contents
/Resources
92 mv $IDLERES/idlelib
/idle
$IDLERES
95 # Finally, build the package...
96 rm -rf MacPython
-OSX.pkg
97 python
$PROGDIR/..
/buildpkg.py \
98 --Title=MacPython
-OSX \
99 --Version=$PYVERSION-$BUILDNUM \
100 --Description="Python $PYVERSION for Mac OS X, framework based" \
101 --NeedsAuthorization="YES" \
103 --InstallOnly="YES" \
107 ## --RootVolumeOnly="YES" \
109 # ...and then make a disk image containing the package.
110 mv MacPython
-OSX.pkg
$DMGDIR/root
111 $PROGDIR/..
/makedmg
$DMGDIR/root
$DMGDIR MacPython
-OSX-$PYVERSION-$BUILDNUM
113 echo Moving
$DMGDIR/MacPython
-OSX-$PYVERSION-$BUILDNUM to
$DESTDIR
114 mv $DMGDIR/MacPython
-OSX-$PYVERSION-$BUILDNUM.dmg
$DESTDIR
117 # Cleanup build/install dirs
118 if [ $DOCLEANUP = yes ]; then
119 echo "Cleaning up..."
124 echo "Cleanup is disabled. You should remove these dirs when done:"