summaryrefslogtreecommitdiffstats
path: root/Mac/OSX/Dist/resources
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-03-21 23:52:36 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-03-21 23:52:36 (GMT)
commit8806d47aff795338346f24c610382bdcf618c46e (patch)
tree46bb3be26f1dcf85e37b83bbd494b91860662bc5 /Mac/OSX/Dist/resources
parent5c83bb0f4a53f65fa70c3bbf5ddbfbe88d01bf25 (diff)
downloadcpython-8806d47aff795338346f24c610382bdcf618c46e.zip
cpython-8806d47aff795338346f24c610382bdcf618c46e.tar.gz
cpython-8806d47aff795338346f24c610382bdcf618c46e.tar.bz2
Tools to build a disk image with a binary installer for MacPython-OSX,
donated by Robin Dunn and the rest of the wxPythonMac crew. These are the versions from cvs.wxwindows.org as of 22-Mar-03, checked in for reference.
Diffstat (limited to 'Mac/OSX/Dist/resources')
-rw-r--r--Mac/OSX/Dist/resources/Welcome.txt6
-rwxr-xr-xMac/OSX/Dist/resources/postflight67
2 files changed, 73 insertions, 0 deletions
diff --git a/Mac/OSX/Dist/resources/Welcome.txt b/Mac/OSX/Dist/resources/Welcome.txt
new file mode 100644
index 0000000..9ecb080
--- /dev/null
+++ b/Mac/OSX/Dist/resources/Welcome.txt
@@ -0,0 +1,6 @@
+Welcome!
+
+This program will install Python 2.3a2 for Mac OS X as a Framework.
+
+Build number: 3
+Build date: Thu Mar 20 18:54:52 PST 2003
diff --git a/Mac/OSX/Dist/resources/postflight b/Mac/OSX/Dist/resources/postflight
new file mode 100755
index 0000000..25c12c1
--- /dev/null
+++ b/Mac/OSX/Dist/resources/postflight
@@ -0,0 +1,67 @@
+#!/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
+ DEST=
+else
+ TOOLDIR=$DEST/bin
+fi
+
+# Make sure the dir exists
+mkdir -p $TOOLDIR
+
+# 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 -x site-packages $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 -x site-packages $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/lib/python$PYVER
+
+
+# Make the site-packages and other dirs writable by the admin.
+for d in $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/lib/python$PYVER/site-packages \
+ $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/bin \
+ $DEST/Applications/MacPython-$PYVER; do
+ chgrp -R admin $d
+ chmod -R g+w $d
+done
+
+
+# The link in the app bundles needs updated.
+for app in BuildApplet IDLE PackageManager PythonIDE; do
+ ln -s $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/Resources/Python.app/Contents/MacOS/python \
+ $DEST/Applications/MacPython-$PYVER/$app.app/Contents/MacOS
+done