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
|
2017-02-12 09:08:56 +01:00
|
|
|
# Depends on: bzip2 expat gdbm libffi mpdecimal sqlite3 xz zlib
|
2017-02-04 03:42:59 +01:00
|
|
|
|
|
|
|
name=python3
|
2017-12-24 04:07:14 +01:00
|
|
|
version=3.6.3
|
2017-07-27 14:42:54 +02:00
|
|
|
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
|
|
|
|
|
2017-02-12 09:08:56 +01:00
|
|
|
# Ensure that we are using the system copy of various libraries
|
|
|
|
rm -r Modules/expat
|
|
|
|
rm -r Modules/zlib
|
|
|
|
rm -r Modules/_ctypes/{darwin,libffi}*
|
|
|
|
rm -r Modules/_decimal/libmpdec
|
|
|
|
|
2017-02-04 03:42:59 +01:00
|
|
|
# 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 \
|
2017-02-12 09:08:56 +01:00
|
|
|
--with-lto \
|
2017-02-04 03:42:59 +01:00
|
|
|
--with-system-expat \
|
|
|
|
--with-system-ffi \
|
2017-02-12 09:08:56 +01:00
|
|
|
--with-system-libmpdec \
|
2017-02-04 03:42:59 +01:00
|
|
|
--without-ensurepip
|
|
|
|
|
|
|
|
make
|
2017-09-07 05:12:45 +02:00
|
|
|
make -j1 DESTDIR=$PKG altinstall maninstall
|
2017-02-04 03:42:59 +01:00
|
|
|
|
2017-02-12 09:08:56 +01:00
|
|
|
ln -s python${version%.*} $PKG/usr/bin/python3
|
2017-05-01 12:41:33 +02:00
|
|
|
ln -s python${version%.*}m-config $PKG/usr/bin/python3-config
|
2017-02-12 09:08:56 +01:00
|
|
|
ln -s idle${version%.*} $PKG/usr/bin/idle3
|
|
|
|
ln -s pydoc${version%.*} $PKG/usr/bin/pydoc3
|
|
|
|
ln -s python${version%.*} $PKG/usr/lib/$name
|
2017-02-04 03:42:59 +01:00
|
|
|
|
|
|
|
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
|
2017-04-13 16:47:12 +02:00
|
|
|
rm $PKG/usr/lib/python${version%.*}/site-packages/README.txt
|
2017-02-04 03:42:59 +01:00
|
|
|
rm $PKG/usr/lib/python${version%.*}/test/{data/README,sndhdrdata/README}
|
|
|
|
rm $PKG/usr/lib/python${version%.*}/tkinter/test/README
|
|
|
|
}
|