lzdoom: new package at 3.88b
[kiss-trunc88.git] / python / build
blob4ddf602dd0211d6b6cf0a7e5a0443c68ba02c682
1 #!/bin/sh -e
3 # Remove util-linux dependency among other things.
4 cat >> Modules/Setup <<EOF
5 *disabled*
6 _uuid nis ossaudiodev
7 EOF
9 # Reported 20-27% performance improvements.
10 # See: "PythonNoSemanticInterpositionSpeedup"
11 export CFLAGS="-DNDEBUG -pipe -march=westmere -fno-semantic-interposition"
12 export LDFLAGS="$LDFLAGS -fno-semantic-interposition"
14 for patch in *.patch; do
15 patch -p1 < "$patch"
16 done
18 ./configure \
19 --prefix=/usr \
20 --enable-shared \
21 --with-system-expat \
22 --with-system-ffi \
23 --with-ensurepip=yes \
24 --without-doc-strings
26 make EXTRA_CFLAGS="-DNDEBUG -pipe -march=westmere -DTHREAD_STACK_SIZE=0x100000"
27 make install
29 ln -s python3 "$1/usr/bin/python"
30 ln -s pip3 "$1/usr/bin/pip"
32 # Let's make some kind of effort to reduce the overall
33 # size of Python by removing a bunch of rarely used and
34 # otherwise useless components.
36 # This can't be done via ./configure as the build system
37 # doesn't give you this much control over the process.
39 cd "$1/usr/lib/python"*
40 rm -rf test ./*/test ./*/tests
41 rm -rf pydoc* idlelib turtle* config-*
43 cd "$1/usr/bin"
44 rm -f pydoc* idle*