diff --git a/builds/runtimes/python-2.7.13 b/builds/runtimes/python-2.7.13 index 85af1a9..3f34aad 100755 --- a/builds/runtimes/python-2.7.13 +++ b/builds/runtimes/python-2.7.13 @@ -13,3 +13,7 @@ cd src ./configure --prefix=$OUT_PREFIX --enable-unicode=ucs4 --with-ensurepip=no make make install + +# Remove unneeded test directories, similar to the official Docker Python images: +# https://github.com/docker-library/python +find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf '{}' + diff --git a/builds/runtimes/python-3.6.2 b/builds/runtimes/python-3.6.2 index c4dd8db..d23d491 100755 --- a/builds/runtimes/python-3.6.2 +++ b/builds/runtimes/python-3.6.2 @@ -14,5 +14,8 @@ cd src make make install -ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python +# Remove unneeded test directories, similar to the official Docker Python images: +# https://github.com/docker-library/python +find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf '{}' + +ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python