summaryrefslogtreecommitdiff
path: root/repo/python/python.xibuild
blob: 91e0d9e5c65ab754f8e2de5f22ac24754dd6a490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh


MAKEDEPS="make autoconf automake autoconf-archive sqlite"
DEPS="bzip2 expat gdbm libffi libnsl libxcrypt openssl zlib grep"

PKG_VER=3.10.2
SOURCE=https://www.python.org/ftp/python/$PKG_VER/Python-$PKG_VER.tgz
DESC="The Python development environment"

prepare () {
    rm -r Modules/expat
    rm -r Modules/_ctypes/darwin*
    rm -r Modules/_ctypes/libffi*
}

build () {
    CFLAGS="-flto"
    autoreconf -i
    GREP="/usr/bin/ggrep" ./configure --prefix=/usr        \
            --enable-shared      \
            --with-system-expat  \
            --with-system-ffi    \
            --with-ensurepip=yes \
            --enable-optimizations &&
    make
}

package () {
    make DESTDIR=$PKG_DEST install 
    ln -s /usr/bin/python3 $PKG_DEST/usr/bin/python
    ln -s /usr/bin/pip3 $PKG_DEST/usr/bin/pip
}