diff options
-rw-r--r-- | main/python2/APKBUILD | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/main/python2/APKBUILD b/main/python2/APKBUILD index 5ac8fad4f4..eae2a0d211 100644 --- a/main/python2/APKBUILD +++ b/main/python2/APKBUILD @@ -4,7 +4,7 @@ pkgname=python2 # the python2-tkinter's pkgver needs to be synchronized with this. pkgver=2.7.14 _verbase=${pkgver%.*} -pkgrel=1 +pkgrel=2 pkgdesc="A high-level scripting language" url="http://www.python.org" arch="all" @@ -36,7 +36,7 @@ prepare() { build() { cd "$builddir" - export OPT="$CFLAGS" + export OPT="$CFLAGS -DTHREAD_STACK_SIZE=0x100000" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -51,6 +51,26 @@ build() { make } +check() { + cd "$builddir" + + # test that we reach recursionlimit before we segfault + cat > test-stacksize.py <<-EOF + import threading + import sys + + def fun(i): + try: + fun(i+1) + except: + sys.exit(0) + + t = threading.Thread(target=fun, args=[1]) + t.start() +EOF + LD_LIBRARY_PATH=$PWD ./python test-stacksize.py +} + package() { cd "$builddir" make -j1 DESTDIR="$pkgdir" install |