]> git.armaanb.net Git - asd-repo.git/blob - extra/python2/build
Switch browser to Chromium
[asd-repo.git] / extra / python2 / build
1 #!/bin/sh -e
2
3 patch -p1 < python2-always-pip.patch
4
5 ./configure \
6     --prefix=/usr \
7     --with-ensurepip=yes
8
9 make
10 make DESTDIR="$1" install
11
12 # Make static library writable.
13 chmod u+w "$1/usr/lib/libpython"*.a
14
15 # Install the LICENSE
16 install -Dm755 LICENSE "$1/usr/share/LICENSES/python2.license"
17
18 # Let's make some kind of effort to reduce the overall
19 # size of Python by removing a bunch of rarely used and
20 # otherwise useless components.
21 #
22 # This can't be done via ./configure as the build system
23 # doesn't give you this much control over the process.
24 {
25     cd "$1/usr/lib/python"*
26     rm -rf test ./*/test ./*/tests
27     rm -rf lib2to3 pydoc* idlelib turtle* ensurepip lib-tk config
28
29     cd "$1/usr/bin"
30     rm -f 2to3* pydoc* idle* python pip
31 }