CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
python3: updated to 3.7.6
[ports/opt-arm64.git] / python3 / Pkgfile
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 zlib
5
6 name=python3
7 version=3.7.6
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/_ctypes/{darwin,libffi}*
17 rm -r Modules/_decimal/libmpdec
18
19 ./configure --prefix=/usr \
20 --enable-shared \
21 --enable-ipv6 \
22 --enable-loadable-sqlite-extensions \
23 --with-computed-gotos \
24 --with-threads \
25 --with-system-expat \
26 --with-system-ffi \
27 --with-system-libmpdec \
28 --without-ensurepip
29
30 make
31 make -j1 DESTDIR=$PKG altinstall maninstall
32
33 ln -s python${version%.*} $PKG/usr/bin/python3
34 ln -s python${version%.*}m-config $PKG/usr/bin/python3-config
35 ln -s python${version%.*}m-config $PKG/usr/bin/python${version%.*}-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 ln -s python-${version%.*}.pc $PKG/usr/lib/pkgconfig/python3.pc
40 ln -s python${version%.*}m $PKG/usr/include/python${version%.*}
41
42 rm $PKG/usr/lib/python${version%.*}/ctypes/macholib/README.ctypes
43 rm $PKG/usr/lib/python${version%.*}/distutils/README
44 rm $PKG/usr/lib/python${version%.*}/idlelib/{ChangeLog,NEWS.txt,NEWS2x.txt}
45 rm $PKG/usr/lib/python${version%.*}/idlelib/{README.txt,TODO.txt,idle_test/README.txt}
46 rm $PKG/usr/lib/python${version%.*}/lib2to3/tests/data/README
47 rm $PKG/usr/lib/python${version%.*}/site-packages/README.txt
48 rm $PKG/usr/lib/python${version%.*}/test/{data/README,sndhdrdata/README}
49 rm $PKG/usr/lib/python${version%.*}/tkinter/test/README
50 }