We are using python 3.10 and the static python3 interpreter binary is about 45MB, but zipapp packs it three times so we end up with 150MB just for the interpreter alone, making the zipapp binary bloated.
$ ls -l runfiles/rules_python++python+python_3_10_x86_64-unknown-linux-gnu/bin/python*
-rwxrwxr-x 1 koi koi 44667000 Jan 1 1980 python
-rwxrwxr-x 1 koi koi 44667000 Jan 1 1980 python3
-rwxrwxr-x 1 koi koi 3149 Jan 1 1980 python3-config
-rwxrwxr-x 1 koi koi 44667000 Jan 1 1980 python3.10
-rwxrwxr-x 1 koi koi 3149 Jan 1 1980 python3.10-config
Also the static interpreter wouldn't need the shared libraries, but that is also being packed into zipapp, increase the size by another 45MB:
$ ls -l runfiles/rules_python++python+python_3_10_x86_64-unknown-linux-gnu/lib/
-rwxrwxr-x 1 koi koi 45131088 Jan 1 1980 libpython3.10.so.1.0
-rwxrwxr-x 1 koi koi 16800 Jan 1 1980 libpython3.so
-rwxrwxr-x 1 koi koi 2340016 Jan 1 1980 libtcl9.0.so
-rwxrwxr-x 1 koi koi 3082472 Jan 1 1980 libtcl9tk9.0.so
...
We are using python 3.10 and the static python3 interpreter binary is about 45MB, but zipapp packs it three times so we end up with 150MB just for the interpreter alone, making the zipapp binary bloated.
Also the static interpreter wouldn't need the shared libraries, but that is also being packed into zipapp, increase the size by another 45MB: