Added new tools and scripts for building a Python distribution
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
3
wxPython/distrib/mac/MacPython/README.txt
Normal file
3
wxPython/distrib/mac/MacPython/README.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
This is a set of build scripts and such for MacPython-OSX 2.3 that I
|
||||
will use until there are standard distributions from Jack.
|
||||
|
84
wxPython/distrib/mac/MacPython/build
Executable file
84
wxPython/distrib/mac/MacPython/build
Executable file
@@ -0,0 +1,84 @@
|
||||
#!/bin/sh -e
|
||||
#----------------------------------------------------------------------
|
||||
# Build MacPython 2.3 and make an Installer package of it
|
||||
|
||||
# Script configs
|
||||
PYVERSION=2.3a1
|
||||
BUILDNUM=1
|
||||
DOCLEANUP=yes
|
||||
|
||||
PROGDIR="`dirname \"$0\"`"
|
||||
TMPDIR=/tmp/_py
|
||||
|
||||
BUILDROOT=$TMPDIR/build
|
||||
INSTALLROOT=$TMPDIR/install
|
||||
DMGDIR=$TMPDIR/dmg
|
||||
RESOURCEDIR=$PROGDIR/resources
|
||||
DESTDIR=/projects/wx/wxPython/dist
|
||||
PYTHONSRC=/projects/Python-$PYVERSION
|
||||
WASTEDIR=/projects/waste
|
||||
|
||||
# Setup
|
||||
mkdir -p $BUILDROOT
|
||||
mkdir -p $INSTALLROOT
|
||||
mkdir -p $DMGDIR/root
|
||||
|
||||
|
||||
# Configure and build Python
|
||||
pushd $BUILDROOT
|
||||
|
||||
# Make a link to the waste dir so that lib can be found. This allows
|
||||
# the PythonIDE to be built
|
||||
if [ ! -e waste ]; then
|
||||
ln -s $WASTEDIR waste
|
||||
fi
|
||||
|
||||
$PYTHONSRC/configure --enable-framework=$INSTALLROOT/Library/Frameworks LDFLAGS=-Wl,-x
|
||||
make
|
||||
make frameworkinstall
|
||||
popd
|
||||
|
||||
|
||||
# Make the Installer package:
|
||||
# First, remove the unix tools as their paths will be wrong. We'll recreate
|
||||
# them in the postinstall.
|
||||
rm -r $INSTALLROOT/usr
|
||||
|
||||
# Next, remove the .pyc/.pyo files
|
||||
python $PROGDIR/../zappycfiles.py $INSTALLROOT
|
||||
|
||||
# Make the welcome message
|
||||
cat > $RESOURCEDIR/Welcome.txt <<EOF
|
||||
Welcome!
|
||||
|
||||
This program will install Python $PYVERSION for Mac OS X as a Framework.
|
||||
|
||||
Build number: $BUILDNUM
|
||||
Build date: `date`
|
||||
EOF
|
||||
|
||||
|
||||
# Finally, build the package...
|
||||
python $PROGDIR/../buildpkg.py \
|
||||
--Title=MacPython-OSX \
|
||||
--Version=$PYVERSION-$BUILDNUM \
|
||||
--Description="Python $PYVERSION for Mac OS X, framework based" \
|
||||
--NeedsAuthorization="YES" \
|
||||
$INSTALLROOT \
|
||||
$RESOURCEDIR
|
||||
|
||||
# ...and then make a disk image containing the package.
|
||||
mv MacPython-OSX.pkg $DMGDIR/root
|
||||
$PROGDIR/../makedmg $DMGDIR/root $DMGDIR MacPython-OSX-$PYVERSION-$BUILDNUM
|
||||
|
||||
echo Moving $DMGDIR/MacPython-OSX-$PYVERSION-$BUILDNUM to $DESTDIR
|
||||
mv $DMGDIR/MacPython-OSX-$PYVERSION-$BUILDNUM.dmg $DESTDIR
|
||||
|
||||
|
||||
# Cleanup build/install dirs
|
||||
if [ $DOCLEANUP = yes ]; then
|
||||
echo cleaning up...
|
||||
rm -rf $BUILDROOT
|
||||
rm -r $INSTALLROOT
|
||||
rm -r $DMGDIR
|
||||
fi
|
6
wxPython/distrib/mac/MacPython/resources/Welcome.txt
Normal file
6
wxPython/distrib/mac/MacPython/resources/Welcome.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Welcome!
|
||||
|
||||
This program will install Python 2.3a1 for Mac OS X as a Framework.
|
||||
|
||||
Build number: 1
|
||||
Build date: Fri Jan 24 16:02:26 PST 2003
|
48
wxPython/distrib/mac/MacPython/resources/postflight
Executable file
48
wxPython/distrib/mac/MacPython/resources/postflight
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
#----------------------------------------------------------------------
|
||||
# Create the unix tools and compile the .py files after Python has been
|
||||
# installed.
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
PYVER=2.3
|
||||
|
||||
PKG=$1
|
||||
DEST=$2
|
||||
|
||||
|
||||
# if destination is / then use usr/local/bin, otherwise just bin
|
||||
if [ "$DEST" = "/" ]; then
|
||||
TOOLDIR=/usr/local/bin
|
||||
else
|
||||
TOOLDIR=$DEST/bin
|
||||
fi
|
||||
|
||||
|
||||
# Make some links to the python executable
|
||||
if [ -e $TOOLDIR/python$PYVER]; then
|
||||
rm $TOOLDIR/python$PYVER
|
||||
fi
|
||||
ln -fs $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/bin/python $TOOLDIR/python$PYVER
|
||||
|
||||
if [ -e $TOOLDIR/python]; then
|
||||
rm $TOOLDIR/python
|
||||
fi
|
||||
ln -fs python$PYVER $TOOLDIR/python
|
||||
|
||||
|
||||
# make the pythonw script
|
||||
cat > $TOOLDIR/pythonw <<EOF
|
||||
#!/bin/sh
|
||||
exec "$DEST/Library/Frameworks/Python.framework/Versions/$PYVER/Resources/Python.app/Contents/MacOS/python" "\$@"
|
||||
EOF
|
||||
chmod +x $TOOLDIR/pythonw
|
||||
|
||||
|
||||
# Compile the .py files in the Python library to .pyc's and then .pyo's
|
||||
$TOOLDIR/python -Wi -tt \
|
||||
$DEST/Library/Frameworks/Python.framework/Versions/$PYVER/lib/python$PYVER/compileall.py \
|
||||
-x badsyntax $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/lib/python$PYVER
|
||||
|
||||
$TOOLDIR/python -Wi -tt -O \
|
||||
$DEST/Library/Frameworks/Python.framework/Versions/$PYVER/lib/python$PYVER/compileall.py \
|
||||
-x badsyntax $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/lib/python$PYVER
|
Reference in New Issue
Block a user