recursive-pth-loader: build sitecustomize.pyc

If this file is not created at build time, then python (when run as root) will
create it at run time and mess up the consistency of the nix store.
This commit is contained in:
Ricardo M. Correia 2013-09-07 00:48:42 +02:00 committed by Bjørn Forsman
parent 575be7dd4b
commit 5f3b19e661

View file

@ -7,11 +7,15 @@ stdenv.mkDerivation rec {
buildInputs = [ python ];
patchPhase = "cat ${./sitecustomize.py} > sitecustomize.py";
buildPhase = "python -m compileall .";
installPhase =
''
dst=$out/lib/${python.libPrefix}/site-packages
mkdir -p $dst
cat ${./sitecustomize.py} >> $dst/sitecustomize.py
cp sitecustomize.* $dst/
'';
meta = {