python: allow stripping tests

This commit is contained in:
Florian Klink 2019-08-18 22:34:12 +02:00
parent 414cde4df4
commit d03283c029

View File

@ -22,6 +22,7 @@
, passthruFun
, bash
, stripIdlelib ? false
, stripTests ? false
}:
assert x11Support -> tcl != null
@ -226,6 +227,9 @@ in with passthru; stdenv.mkDerivation {
'' + optionalString stripIdlelib ''
# Strip IDLE (and turtledemo, which uses it)
rm -R $out/bin/idle* $out/lib/python*/{idlelib,turtledemo}
'' + optionalString stripTests ''
# Strip tests
rm -R $out/lib/python*/test $out/lib/python*/**/test{,s}
'' + ''
# Include a sitecustomize.py file
cp ${../sitecustomize.py} $out/${sitePackages}/sitecustomize.py