diff --git a/docker/2_buildpy/build.sh b/docker/2_buildpy/build.sh index 665385d..9c119e7 100755 --- a/docker/2_buildpy/build.sh +++ b/docker/2_buildpy/build.sh @@ -33,6 +33,15 @@ make -j8 install chown -R $UID:$GID /opt/python/* EOT +# Strip some stuff we don't need from the Python install. +rm -rf $PYTHONTARGET/lib/python3.*/test +rm -rf $PYTHONTARGET/lib/python3.*/config-3.*/libpython3.*.a +find $PYTHONTARGET/lib -name '*.so.*' -o -name '*.so' | while read libname; do + chmod u+w "$libname" + strip "$libname" +done + + # Create another docker image which contains the actual Python. # This one will serve as base for the Wheel builder and the # production image.