blob: 30a9b4fc74e61cbcf5338c40b1c1fd29240f886c (
plain)
1 # Description: Python interpreter, version 2.7
2 # URL: http://www.python.org
3 # Maintainer: Juergen Daubert, jue at crux dot nu
4 # Depends on: db gdbm openssl bzip2 zlib sqlite3
5
6 name=python
7 version=2.7.16
8 release=1
9 source=(http://www.python.org/ftp/$name/$version/Python-$version.tar.xz \
10 pyconfig.h)
11
12 build () {
13 cd Python-$version
14
15 # set OPT to the python default without -O3
16 # our CFLAGS are used as well
17 OPT="-Wall -Wstrict-prototypes -fwrapv" \
18 ./configure --prefix=/usr \
19 --enable-shared \
20 --with-threads \
21 --enable-ipv6
22
23 make
24 make -j1 DESTDIR=$PKG install
25
26 # fix issue with man-page symlink
27 ln -sf python2.7.1 $PKG/usr/share//man/man1/python.1
28
29 ln -sf python2.7 $PKG/usr/bin/python
30 ln -s python2.7 $PKG/usr/lib/python
31 ln -s python2.7 $PKG/usr/include/python
32 ln -s /usr/lib/libpython2.7.so $PKG/usr/lib/python2.7/config/libpython2.7.so
33
34 rm -r $PKG/usr/lib/python/{bsddb,ctypes,email,sqlite3}/test
35 rm -r $PKG/usr/lib/python/{distutils,json,lib2to3}/tests
36 rm $PKG/usr/lib/python/{distutils,site-packages,test/data}/README
37 rm $PKG/usr/lib/python/idlelib/{ChangeLog,{NEWS,README,TODO}.txt}
38 rm $PKG/usr/lib/python/ctypes/macholib/README.ctypes
39
40 mv $PKG/usr/include/python2.7/pyconfig{,-64}.h
41 install -m 0644 $SRC/pyconfig.h $PKG/usr/include/python2.7/
42 }
|