opt/python3/Pkgfile

41 lines
1.4 KiB
Plaintext
Raw Normal View History

2017-02-04 03:42:59 +01:00
# Description: Python interpreter, version 3.
# URL: https://www.python.org/
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: bzip2 expat gdbm libffi openssl sqlite3 xz zlib
name=python3
version=3.6.0
release=1
2017-02-04 10:08:27 +01:00
source=(https://www.python.org/ftp/python/$version/Python-$version.tar.xz)
2017-02-04 03:42:59 +01:00
build() {
cd Python-$version
# set OPT to the python default without -O3 or -g
# our CFLAGS are used as well
OPT="-Wall -Wstrict-prototypes -Wno-unused-result -Wsign-compare -fwrapv" \
./configure --prefix=/usr \
--enable-shared \
--enable-ipv6 \
--enable-loadable-sqlite-extensions \
--with-threads \
--with-system-expat \
--with-system-ffi \
--without-ensurepip
make
make -j1 DESTDIR=$PKG install
ln -s python${version%.*} $PKG/usr/lib/$name
rm $PKG/usr/bin/2to3
rm $PKG/usr/lib/python${version%.*}/ctypes/macholib/README.ctypes
rm $PKG/usr/lib/python${version%.*}/distutils/README
rm $PKG/usr/lib/python${version%.*}/idlelib/{ChangeLog,NEWS.txt,NEWS2x.txt}
rm $PKG/usr/lib/python${version%.*}/idlelib/{README.txt,TODO.txt,idle_test/README.txt}
rm $PKG/usr/lib/python${version%.*}/lib2to3/tests/data/README
rm $PKG/usr/lib/python${version%.*}/site-packages/{README,README.txt}
rm $PKG/usr/lib/python${version%.*}/test/{data/README,sndhdrdata/README}
rm $PKG/usr/lib/python${version%.*}/tkinter/test/README
}