blob: 98a14850dbe4f1f7482af53cae0aca150bb27f36 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{ stdenv, python }:
stdenv.mkDerivation rec {
name = "site-1.0";
unpackPhase = "true";
buildInputs = [ python ];
installPhase =
''
dst=$out/lib/${python.libPrefix}/site-packages
mkdir -p $dst
cat ${./site.py} >> $dst/site.py
'';
meta = {
description = "Enable processing of pth files anywhere in PYTHONPATH";
longDescription = ''
This file is normally created by easy_install / distutils in
site-packages and overrides python's default site.py. It adds
all parts of PYTHONPATH as site directories, which means pth
files are processed in them. We remove the normally created
site.py's and package it separately instead as it would cause
collisions.
For each module we have a pth file listing the module and all
its dependencies and we include python-site into the
PYTHONPATH of wrapped python programs so they can find their
dependencies.
'';
};
}
|