summaryrefslogtreecommitdiffstats
path: root/Mac/BuildScript/scripts/postflight.framework
blob: a63909358f1719605585912e6e34e8e3f778db30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
#
# Recompile the .py files.
#

PYVER="@PYVER@"
FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@"

"${FWK}/bin/python@PYVER@" -E -s -Wi \
    "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
    -f -x 'bad_coding|badsyntax|site-packages|test/test_lib2to3/data' \
    "${FWK}/lib/python${PYVER}"

"${FWK}/bin/python@PYVER@" -E -s -Wi -O \
    "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
    -f -x 'bad_coding|badsyntax|site-packages|test/test_lib2to3/data' \
    "${FWK}/lib/python${PYVER}"

"${FWK}/bin/python@PYVER@" -E -s -Wi \
    "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
    -f -x badsyntax \
    "${FWK}/lib/python${PYVER}/site-packages"

"${FWK}/bin/python@PYVER@" -E -s -Wi -O \
    "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
    -f -x badsyntax \
    "${FWK}/lib/python${PYVER}/site-packages"

chgrp -R admin "${FWK}"
chmod -R g+w "${FWK}"

exit 0