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 | |
b14e0253 | 8 | version=2.7.14 |
90a859d9 VM |
9 | release=1 |
10 | source=(http://www.python.org/ftp/$name/$version/Python-$version.tar.xz \ | |
11 | pyconfig.h) | |
12 | ||
13 | build () { | |
14 | cd Python-$version | |
15 | ||
b14e0253 VM |
16 | export CFLAGS="-O2 -pipe -mfloat-abi=hard" |
17 | export CXXFLAGS="$CFLAGS" | |
18 | ||
90a859d9 VM |
19 | # set OPT to the python default without -O3 |
20 | # our CFLAGS are used as well | |
21 | OPT="-Wall -Wstrict-prototypes -fwrapv" \ | |
22 | ./configure --prefix=/usr \ | |
90a859d9 VM |
23 | --enable-shared \ |
24 | --with-threads \ | |
e22d59c0 | 25 | --enable-ipv6 |
90a859d9 VM |
26 | |
27 | make | |
28 | make -j1 DESTDIR=$PKG install | |
29 | ||
30 | # fix issue with man-page symlink | |
53d59746 | 31 | ln -sf python2.7.1 $PKG/usr/share/man/man1/python.1 |
90a859d9 VM |
32 | |
33 | ln -sf python2.7 $PKG/usr/bin/python | |
34 | ln -s python2.7 $PKG/usr/lib/python | |
35 | ln -s python2.7 $PKG/usr/include/python | |
36 | ln -s /usr/lib/libpython2.7.so $PKG/usr/lib/python2.7/config/libpython2.7.so | |
37 | ||
38 | rm -r $PKG/usr/lib/python/{bsddb,ctypes,email,sqlite3}/test | |
39 | rm -r $PKG/usr/lib/python/{distutils,json,lib2to3}/tests | |
40 | rm $PKG/usr/lib/python/{distutils,site-packages,test/data}/README | |
41 | rm $PKG/usr/lib/python/idlelib/{ChangeLog,{NEWS,README,TODO}.txt} | |
42 | rm $PKG/usr/lib/python/ctypes/macholib/README.ctypes | |
43 | ||
44 | mv $PKG/usr/include/python2.7/pyconfig{,-32}.h | |
e1019ac1 | 45 | install -m 0644 $SRC/pyconfig.h $PKG/usr/include/python2.7/ |
90a859d9 | 46 | } |