3 # Remove util-linux dependency among other things.
4 cat >> Modules/Setup <<EOF
9 # Reported 20-27% performance improvements.
10 # See: "PythonNoSemanticInterpositionSpeedup"
11 export CFLAGS="$CFLAGS -fno-semantic-interposition"
12 export CXXFLAGS="$CXXFLAGS -fno-semantic-interposition"
13 export LDFLAGS="$LDFLAGS -fno-semantic-interposition"
15 patch -p1 < python3-always-pip.patch
22 --with-ensurepip=yes \
26 make DESTDIR="$1" install
28 ln -s python3 "$1/usr/bin/python"
29 ln -s pip3 "$1/usr/bin/pip"
31 # Make static library writable.
32 chmod u+w "$1/usr/lib/libpython"*
34 # Let's make some kind of effort to reduce the overall
35 # size of Python by removing a bunch of rarely used and
36 # otherwise useless components.
38 # This can't be done via ./configure as the build system
39 # doesn't give you this much control over the process.
41 cd "$1/usr/lib/python"*
42 rm -rf test ./*/test ./*/tests
43 rm -rf idlelib turtle* config-*