python: allow stripping IDLE

This commit is contained in:
Florian Klink 2019-08-18 22:23:13 +02:00
parent 5c0d493df4
commit 414cde4df4

View File

@ -21,6 +21,7 @@
, sha256
, passthruFun
, bash
, stripIdlelib ? false
}:
assert x11Support -> tcl != null
@ -222,6 +223,10 @@ in with passthru; stdenv.mkDerivation {
find $out/lib/python*/config-* -type f -print -exec nuke-refs -e $out '{}' +
find $out/lib -name '_sysconfigdata*.py*' -print -exec nuke-refs -e $out '{}' +
'' + optionalString stripIdlelib ''
# Strip IDLE (and turtledemo, which uses it)
rm -R $out/bin/idle* $out/lib/python*/{idlelib,turtledemo}
'' + ''
# Include a sitecustomize.py file
cp ${../sitecustomize.py} $out/${sitePackages}/sitecustomize.py