It would be easier to include required libs in image (need to build your own).
Use this post_makeinstall_target() function in packages/lang/Python2/package.mk
post_makeinstall_target() {
rm -fr $PKG_BUILD/.$TARGET_NAME/build/temp.*
for dir in bsddb idlelib lib-tk lib2to3 msilib pydoc_data test unittest; do
# added
if [ "$dir" = "lib2to3" ]; then
rm -rf $INSTALL/usr/lib/python*/$dir/tests
continue
fi
rm -rf $INSTALL/usr/lib/python*/$dir
done
rm -rf $INSTALL/usr/lib/python*/config
# removed
# rm -rf $INSTALL/usr/bin/2to3
rm -rf $INSTALL/usr/bin/idle
rm -rf $INSTALL/usr/bin/pydoc
rm -rf $INSTALL/usr/bin/smtpd.py
rm -rf $INSTALL/usr/bin/python*-config
cd $INSTALL/usr/lib/$PKG_PYTHON_VERSION
$TOOLCHAIN/bin/python -Wi -t -B $PKG_BUILD/Lib/compileall.py -d /usr/lib/$PKG_PYTHON_VERSION -f .
find $INSTALL/usr/lib/$PKG_PYTHON_VERSION -name "*.py" -exec rm -f {} \; &>/dev/null
# strip
chmod u+w $INSTALL/usr/lib/libpython*.so.*
debug_strip $INSTALL/usr
}
Display More
Clean Python2 package and make image
PROJECT=... ./scripts/clean Python2
PROJECT=... make
install addon which should work (for me it ask for credentials).
![]()