Python: dont leak full paths in compiled .pyo

This commit is contained in:
Stefan Saraev 2016-04-24 13:21:03 +03:00 committed by Lukas Rusak
parent f4a3fe2bce
commit 02b0648996

View File

@ -121,9 +121,6 @@ post_makeinstall_target() {
rm -rf $INSTALL/usr/lib/python*/$dir
done
python -Wi -t -B ../Lib/compileall.py $INSTALL/usr/lib/python*/ -f
rm -rf `find $INSTALL/usr/lib/python*/ -name "*.py"`
rm -rf $INSTALL/usr/lib/python*/config
rm -rf $INSTALL/usr/bin/2to3
rm -rf $INSTALL/usr/bin/idle
@ -131,6 +128,10 @@ post_makeinstall_target() {
rm -rf $INSTALL/usr/bin/smtpd.py
rm -rf $INSTALL/usr/bin/python*-config
cd $INSTALL/usr/lib/python2.7
python -Wi -t -B $PKG_BUILD/Lib/compileall.py -d /usr/lib/python2.7 -f .
find $INSTALL/usr/lib/python2.7 -name "*.py" -exec rm -f {} \; &>/dev/null
# strip
chmod u+w $INSTALL/usr/lib/libpython*.so.*
debug_strip $INSTALL/usr