Commit 774f948b authored by Ned Deily's avatar Ned Deily

Update compileall calls in OS X installer postflight script to

properly skip uncompilable files and to compile existing
files in site-packages if reinstalling.  Also, no longer
attempt to install a documentation link in /Developer
as that no longer necessarily exists with Xcode 4.3+.
parent 39c6f35a
...@@ -5,19 +5,10 @@ FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}" ...@@ -5,19 +5,10 @@ FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}"
FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation" FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation"
FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}" FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}"
APPDIR="/Applications/Python ${PYVER}" APPDIR="/Applications/Python ${PYVER}"
DEV_DOCDIR="/Developer/Documentation"
SHARE_DIR="${FWK}/share" SHARE_DIR="${FWK}/share"
SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}" SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}"
SHARE_DOCDIR_TO_FWK="../../.." SHARE_DOCDIR_TO_FWK="../../.."
# make link in /Developer/Documentation/ for Xcode users
if [ -d "${DEV_DOCDIR}" ]; then
if [ ! -d "${DEV_DOCDIR}/Python" ]; then
mkdir -p "${DEV_DOCDIR}/Python"
fi
ln -fhs "${FWK_DOCDIR}" "${DEV_DOCDIR}/Python/Reference Documentation ${PYVER}"
fi
# make link in /Applications/Python m.n/ for Finder users # make link in /Applications/Python m.n/ for Finder users
if [ -d "${APPDIR}" ]; then if [ -d "${APPDIR}" ]; then
ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html" ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
......
...@@ -8,14 +8,24 @@ FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@" ...@@ -8,14 +8,24 @@ FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@"
"${FWK}/bin/python@PYVER@" -Wi \ "${FWK}/bin/python@PYVER@" -Wi \
"${FWK}/lib/python${PYVER}/compileall.py" \ "${FWK}/lib/python${PYVER}/compileall.py" \
-x badsyntax -x site-packages \ -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
"${FWK}/lib/python${PYVER}" "${FWK}/lib/python${PYVER}"
"${FWK}/bin/python@PYVER@" -Wi -O \ "${FWK}/bin/python@PYVER@" -Wi -O \
"${FWK}/lib/python${PYVER}/compileall.py" \ "${FWK}/lib/python${PYVER}/compileall.py" \
-x badsyntax -x site-packages \ -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
"${FWK}/lib/python${PYVER}" "${FWK}/lib/python${PYVER}"
"${FWK}/bin/python@PYVER@" -Wi \
"${FWK}/lib/python${PYVER}/compileall.py" \
-f -x badsyntax \
"${FWK}/lib/python${PYVER}/site-packages"
"${FWK}/bin/python@PYVER@" -Wi -O \
"${FWK}/lib/python${PYVER}/compileall.py" \
-f -x badsyntax \
"${FWK}/lib/python${PYVER}/site-packages"
chgrp -R admin "${FWK}" chgrp -R admin "${FWK}"
chmod -R g+w "${FWK}" chmod -R g+w "${FWK}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment