blob: 34bb5abe8f58cbb6efaece406c26ef6542f15623 (
plain)
1 # Description: Python interpreter, version 3.
2 # URL: https://www.python.org/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: bzip2 expat gdbm libffi libtirpc mpdecimal sqlite3 xz
5
6 name=python3
7 version=3.6.7
8 release=1
9 source=(https://www.python.org/ftp/python/$version/Python-$version.tar.xz)
10
11 build() {
12 cd Python-$version
13
14 # Ensure that we are using the system copy of various libraries
15 rm -r Modules/expat
16 rm -r Modules/zlib
17 rm -r Modules/_ctypes/{darwin,libffi}*
18 rm -r Modules/_decimal/libmpdec
19
20 ./configure --prefix=/usr \
21 --enable-shared \
22 --enable-ipv6 \
23 --enable-loadable-sqlite-extensions \
24 --with-computed-gotos \
25 --with-threads \
26 --with-system-expat \
27 --with-system-ffi \
28 --with-system-libmpdec \
29 --without-ensurepip
30
31 make
32 make -j1 DESTDIR=$PKG altinstall maninstall
33
34 ln -s python${version%.*} $PKG/usr/bin/python3
35 ln -s python${version%.*}m-config $PKG/usr/bin/python3-config
36 ln -s idle${version%.*} $PKG/usr/bin/idle3
37 ln -s pydoc${version%.*} $PKG/usr/bin/pydoc3
38 ln -s python${version%.*} $PKG/usr/lib/$name
39
40 rm $PKG/usr/lib/python${version%.*}/ctypes/macholib/README.ctypes
41 rm $PKG/usr/lib/python${version%.*}/distutils/README
42 rm $PKG/usr/lib/python${version%.*}/idlelib/{ChangeLog,NEWS.txt,NEWS2x.txt}
43 rm $PKG/usr/lib/python${version%.*}/idlelib/{README.txt,TODO.txt,idle_test/README.txt}
44 rm $PKG/usr/lib/python${version%.*}/lib2to3/tests/data/README
45 rm $PKG/usr/lib/python${version%.*}/site-packages/README.txt
46 rm $PKG/usr/lib/python${version%.*}/test/{data/README,sndhdrdata/README}
47 rm $PKG/usr/lib/python${version%.*}/tkinter/test/README
48 }
|