Commit | Line | Data |
---|---|---|
90a859d9 VM |
1 | # Description: Python interpreter, version 2.7 |
2 | # URL: http://www.python.org | |
3 | # Maintainer: Juergen Daubert, jue at crux dot nu | |
90a859d9 | 4 | # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu |
8f68de03 | 5 | # Depends on: db gdbm openssl bzip2 zlib sqlite3 |
90a859d9 VM |
6 | |
7 | name=python | |
98ec9a41 VM |
8 | version=2.7.18 |
9 | release=2 | |
90a859d9 VM |
10 | source=(http://www.python.org/ftp/$name/$version/Python-$version.tar.xz \ |
11 | pyconfig.h) | |
12 | ||
13 | build () { | |
14 | cd Python-$version | |
15 | ||
98ec9a41 VM |
16 | # remove 2to3, we use the one from python3 |
17 | rm -r Lib/lib2to3 | |
18 | ||
b14e0253 VM |
19 | export CFLAGS="-O2 -pipe -mfloat-abi=hard" |
20 | export CXXFLAGS="$CFLAGS" | |
21 | ||
98ec9a41 VM |
22 | # remove tests |
23 | rm -r Lib/{bsddb,ctypes,email,lib-tk,sqlite3,unittest}/test | |
24 | rm -r Lib/{{distutils,json}/tests,idlelib/idle_test,test} | |
25 | ||
90a859d9 | 26 | ./configure --prefix=/usr \ |
90a859d9 VM |
27 | --enable-shared \ |
28 | --with-threads \ | |
e22d59c0 | 29 | --enable-ipv6 |
90a859d9 VM |
30 | |
31 | make | |
32 | make -j1 DESTDIR=$PKG install | |
33 | ||
34 | # fix issue with man-page symlink | |
53d59746 | 35 | ln -sf python2.7.1 $PKG/usr/share/man/man1/python.1 |
90a859d9 VM |
36 | |
37 | ln -sf python2.7 $PKG/usr/bin/python | |
38 | ln -s python2.7 $PKG/usr/lib/python | |
39 | ln -s python2.7 $PKG/usr/include/python | |
40 | ln -s /usr/lib/libpython2.7.so $PKG/usr/lib/python2.7/config/libpython2.7.so | |
41 | ||
98ec9a41 VM |
42 | rm $PKG/usr/bin/2to3 |
43 | rm $PKG/usr/lib/python/{distutils,site-packages}/README | |
90a859d9 VM |
44 | rm $PKG/usr/lib/python/idlelib/{ChangeLog,{NEWS,README,TODO}.txt} |
45 | rm $PKG/usr/lib/python/ctypes/macholib/README.ctypes | |
46 | ||
47 | mv $PKG/usr/include/python2.7/pyconfig{,-32}.h | |
e1019ac1 | 48 | install -m 0644 $SRC/pyconfig.h $PKG/usr/include/python2.7/ |
90a859d9 | 49 | } |