summaryrefslogtreecommitdiffstats
path: root/Mac/OSX/Dist/resources
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-03-22 00:02:23 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-03-22 00:02:23 (GMT)
commit57c914c1aac07083ac2c03e6501750d662e0eb6b (patch)
tree273c32cdf36d763b275bf72c12b761dc9c37e907 /Mac/OSX/Dist/resources
parent8806d47aff795338346f24c610382bdcf618c46e (diff)
downloadcpython-57c914c1aac07083ac2c03e6501750d662e0eb6b.zip
cpython-57c914c1aac07083ac2c03e6501750d662e0eb6b.tar.gz
cpython-57c914c1aac07083ac2c03e6501750d662e0eb6b.tar.bz2
Lots of tweaks to make this work in the new setting. Not fully tested yet.
Diffstat (limited to 'Mac/OSX/Dist/resources')
-rwxr-xr-xMac/OSX/Dist/resources/postflight47
1 files changed, 27 insertions, 20 deletions
diff --git a/Mac/OSX/Dist/resources/postflight b/Mac/OSX/Dist/resources/postflight
index 25c12c1..4caa2b0 100755
--- a/Mac/OSX/Dist/resources/postflight
+++ b/Mac/OSX/Dist/resources/postflight
@@ -22,23 +22,18 @@ fi
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
+ln -fsh $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/bin/python $TOOLDIR/python$PYVER
+ln -fsh python$PYVER $TOOLDIR/python
# make the pythonw script
-cat > $TOOLDIR/pythonw <<EOF
+rm -f $TOOLDIR/pythonw$PYVER
+cat > $TOOLDIR/pythonw$PYVER <<EOF
#!/bin/sh
exec "$DEST/Library/Frameworks/Python.framework/Versions/$PYVER/Resources/Python.app/Contents/MacOS/python" "\$@"
EOF
-chmod +x $TOOLDIR/pythonw
+chmod +x $TOOLDIR/pythonw$PYVER
+ln -fsh pythonw$PYVER $TOOLDIR/pythonw
# Compile the .py files in the Python library to .pyc's and then .pyo's
@@ -48,20 +43,32 @@ $TOOLDIR/python -Wi -tt \
$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
+ -x badsyntax -x site-packages $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/lib/python$PYVER
+$TOOLDIR/python -Wi -tt \
+ $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/lib/python$PYVER/compileall.py \
+ $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/Mac/Tools
-# 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
+$TOOLDIR/python -Wi -tt -O \
+ $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/lib/python$PYVER/compileall.py \
+ $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/Mac/Tools
+
+
+# Make the site-packages and other dirs writable by the admin if destination is /
+
+if [ "$DEST" = "/" ]; then
+ for d in $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/lib/python$PYVER/site-packages \
+ $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/bin \
+ $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/Resources/Python.app/Contents/Resources \
+ $DEST/Applications/MacPython-$PYVER; do
+ chgrp -R admin $d
+ chmod -R g+w $d
+ done
+fi
# 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 \
+ ln -fsh $DEST/Library/Frameworks/Python.framework/Versions/$PYVER/Resources/Python.app/Contents/MacOS/python \
$DEST/Applications/MacPython-$PYVER/$app.app/Contents/MacOS
done