repo/extra/python2/build

29 lines
664 B
Plaintext
Raw Normal View History

2019-07-23 08:57:39 +00:00
#!/bin/sh -e
2020-06-07 20:14:46 +00:00
patch -p1 < python2-always-pip.patch
2019-07-23 08:57:39 +00:00
./configure \
--prefix=/usr \
2020-06-07 20:14:46 +00:00
--with-ensurepip=yes
2019-07-23 08:57:39 +00:00
make
make DESTDIR="$1" install
2019-08-29 20:57:16 +00:00
# Make static library writable.
2020-02-25 22:33:37 +00:00
chmod u+w "$1/usr/lib/libpython"*.a
2020-03-24 13:56:17 +00:00
# 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"
2020-06-07 20:14:46 +00:00
rm -f 2to3* pydoc* idle* python pip
2020-03-24 13:56:17 +00:00
}