CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
python3: updated to 3.6.8
[ports/opt-arm64.git] / python3 / Pkgfile
CommitLineData
273eb973
VM
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
6name=python3
9e788212 7version=3.6.8
273eb973
VM
8release=1
9source=(https://www.python.org/ftp/python/$version/Python-$version.tar.xz)
10
11build() {
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 # set OPT to the python default without -O3 or -g
21 # our CFLAGS are used as well
22 OPT="-Wall -Wstrict-prototypes -Wno-unused-result -Wsign-compare -fwrapv" \
23 ./configure --prefix=/usr \
24 --enable-shared \
25 --enable-ipv6 \
26 --enable-loadable-sqlite-extensions \
27 --with-threads \
28 --with-lto \
29 --with-system-expat \
30 --with-system-ffi \
31 --with-system-libmpdec \
32 --without-ensurepip
33
34 make
35 make -j1 DESTDIR=$PKG altinstall maninstall
36
37 ln -s python${version%.*} $PKG/usr/bin/python3
38 ln -s python${version%.*}m-config $PKG/usr/bin/python3-config
39 ln -s idle${version%.*} $PKG/usr/bin/idle3
40 ln -s pydoc${version%.*} $PKG/usr/bin/pydoc3
41 ln -s python${version%.*} $PKG/usr/lib/$name
42
43 rm $PKG/usr/lib/python${version%.*}/ctypes/macholib/README.ctypes
44 rm $PKG/usr/lib/python${version%.*}/distutils/README
45 rm $PKG/usr/lib/python${version%.*}/idlelib/{ChangeLog,NEWS.txt,NEWS2x.txt}
46 rm $PKG/usr/lib/python${version%.*}/idlelib/{README.txt,TODO.txt,idle_test/README.txt}
47 rm $PKG/usr/lib/python${version%.*}/lib2to3/tests/data/README
48 rm $PKG/usr/lib/python${version%.*}/site-packages/README.txt
49 rm $PKG/usr/lib/python${version%.*}/test/{data/README,sndhdrdata/README}
50 rm $PKG/usr/lib/python${version%.*}/tkinter/test/README
51}