From 2284b95e6b52c558521f5a37fb3ce6fe3b636add Mon Sep 17 00:00:00 2001 From: Sergei Reznikov Date: Wed, 22 Nov 2017 13:30:56 +0300 Subject: [PATCH] python3: disable debug build, drop testsuit * turns out exportig OPT var disables debug build * drop testsuite as it takes a lot of space, perhaps needs to be moved into a separate package * should we drop __pycache__ as well? Used https://git.centos.org/blob/rpms!rh-python36-python.git/c7/SPECS!python.spec#L1484 and https://packages.debian.org/source/buster/python3.6 as a reference --- dev-lang/python/python3-3.6.3.recipe | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dev-lang/python/python3-3.6.3.recipe b/dev-lang/python/python3-3.6.3.recipe index 3a73fc0bd..e3cae8489 100644 --- a/dev-lang/python/python3-3.6.3.recipe +++ b/dev-lang/python/python3-3.6.3.recipe @@ -99,6 +99,7 @@ BUILD() libtoolize --force --copy --install aclocal autoconf + export OPT="" runConfigure --omit-dirs binDir,includeDir ./configure \ --enable-shared --without-ensurepip \ --with-system-expat --bindir=$commandBinDir --includedir=$developDir/headers @@ -130,6 +131,14 @@ INSTALL() mkdir -p $prefix/non-packaged/lib/python3.6 mv $prefix/lib/python3.6/site-packages $prefix/non-packaged/lib/python3.6/ + + # drop testsuite altogether; move to a separate package if needed + cd $prefix/lib/python3.6 + rm -rf ctypes/test distutils/tests idlelib/idle_test lib2to3/tests \ + sqlite3/test test tkinter/test unittest/test + + # TODO: drop __pycache__ folders as well? + find . -name __pycache__ | xargs rm -rf } TEST()