2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-07-02 14:02:27 +00:00

python2: Reduce size to 30MB

This commit is contained in:
Dylan Araps 2020-03-24 15:56:17 +02:00
parent 878a5ff1d5
commit 0c0d9f287d
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

View File

@ -7,8 +7,20 @@
make
make DESTDIR="$1" install
rm "$1/usr/bin/2to3"
rm "$1/usr/bin/python"
# Make static library writable.
chmod u+w "$1/usr/lib/libpython"*.a
# Let's make some kind of effort to reduce the overall
# size of Python by removing a bunch of rarely used and
# otherwise useless components.
#
# This can't be done via ./configure as the build system
# doesn't give you this much control over the process.
{
cd "$1/usr/lib/python"*
rm -rf test ./*/test ./*/tests
rm -rf lib2to3 pydoc* idlelib turtle* ensurepip lib-tk config
cd "$1/usr/bin"
rm -f 2to3* pydoc* idle* python
}