1 # global distutils configuration, see http://docs.python.org/2/install/index.html#distutils-configuration-files
3 { stdenv, python, writeText, extraCfg ? "", overrideCfg ? "" }:
7 distutilsCfg = writeText "distutils.cfg" (
8 if overrideCfg != "" then overrideCfg else ''
11 # don't allow network connections during build to ensure purity
14 # make sure we always unzip installed packages otherwise setup hooks won't work
19 in stdenv.mkDerivation {
20 name = "${python.libPrefix}-distutils.cfg";
22 buildInputs = [ python ];
27 dest="$out/lib/${python.libPrefix}/site-packages/distutils"
29 ln -s ${python}/lib/${python.libPrefix}/distutils/* $dest
30 ln -s ${distutilsCfg} $dest/distutils.cfg