Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4c2f4e5

Browse files
committed
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+.
1 parent ec177c1 commit 4c2f4e5

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

Mac/BuildScript/scripts/postflight.documentation

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,10 @@ FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}"
55
FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation"
66
FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}"
77
APPDIR="/Applications/Python ${PYVER}"
8-
DEV_DOCDIR="/Developer/Documentation"
98
SHARE_DIR="${FWK}/share"
109
SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}"
1110
SHARE_DOCDIR_TO_FWK="../../.."
1211

13-
# make link in /Developer/Documentation/ for Xcode users
14-
if [ -d "${DEV_DOCDIR}" ]; then
15-
if [ ! -d "${DEV_DOCDIR}/Python" ]; then
16-
mkdir -p "${DEV_DOCDIR}/Python"
17-
fi
18-
ln -fhs "${FWK_DOCDIR}" "${DEV_DOCDIR}/Python/Reference Documentation ${PYVER}"
19-
fi
20-
2112
# make link in /Applications/Python m.n/ for Finder users
2213
if [ -d "${APPDIR}" ]; then
2314
ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"

Mac/BuildScript/scripts/postflight.framework

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,24 @@ FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@"
88

99
"${FWK}/bin/python@PYVER@" -Wi \
1010
"${FWK}/lib/python${PYVER}/compileall.py" \
11-
-x badsyntax -x site-packages \
11+
-f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
1212
"${FWK}/lib/python${PYVER}"
1313

1414
"${FWK}/bin/python@PYVER@" -Wi -O \
1515
"${FWK}/lib/python${PYVER}/compileall.py" \
16-
-x badsyntax -x site-packages \
16+
-f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
1717
"${FWK}/lib/python${PYVER}"
1818

19+
"${FWK}/bin/python@PYVER@" -Wi \
20+
"${FWK}/lib/python${PYVER}/compileall.py" \
21+
-f -x badsyntax \
22+
"${FWK}/lib/python${PYVER}/site-packages"
23+
24+
"${FWK}/bin/python@PYVER@" -Wi -O \
25+
"${FWK}/lib/python${PYVER}/compileall.py" \
26+
-f -x badsyntax \
27+
"${FWK}/lib/python${PYVER}/site-packages"
28+
1929
chgrp -R admin "${FWK}"
2030
chmod -R g+w "${FWK}"
2131

0 commit comments

Comments
 (0)