From ccb5d0fc19729a0b25cd550086320e76e6b1da69 Mon Sep 17 00:00:00 2001 From: Florian Friesdorf Date: Fri, 23 Nov 2012 18:33:03 +0100 Subject: [PATCH 1/2] fix python module builder --- pkgs/development/python-modules/generic/builder.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/python-modules/generic/builder.sh b/pkgs/development/python-modules/generic/builder.sh index 52b66aaf6a6..43ad139fe74 100644 --- a/pkgs/development/python-modules/generic/builder.sh +++ b/pkgs/development/python-modules/generic/builder.sh @@ -1,10 +1,6 @@ source $stdenv/setup # do not allow distutils to make downloads, whatever install command is used -export PYTHONPATH="${setuptools}/lib/${python.libPrefix}:$PYTHONPATH" export PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}:$PYTHONPATH" -# enable pth files for dependencies -export PYTHONPATH="${site}/lib/${python.libPrefix}/site-packages:$PYTHONPATH" - genericBuild From 74d963c69a6d5f3f1f969bc477046d1342eea0b3 Mon Sep 17 00:00:00 2001 From: Florian Friesdorf Date: Sat, 24 Nov 2012 22:32:47 +0100 Subject: [PATCH 2/2] offlineDistutils in PYTHONPATH in configurePhase instead of builder.sh Conflicts: pkgs/development/python-modules/generic/default.nix --- pkgs/development/python-modules/generic/builder.sh | 6 ------ pkgs/development/python-modules/generic/default.nix | 8 +++++++- 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 pkgs/development/python-modules/generic/builder.sh diff --git a/pkgs/development/python-modules/generic/builder.sh b/pkgs/development/python-modules/generic/builder.sh deleted file mode 100644 index 43ad139fe74..00000000000 --- a/pkgs/development/python-modules/generic/builder.sh +++ /dev/null @@ -1,6 +0,0 @@ -source $stdenv/setup - -# do not allow distutils to make downloads, whatever install command is used -export PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}:$PYTHONPATH" - -genericBuild diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index e7f98f94d00..b5889b36f13 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -32,6 +32,7 @@ python setup.py test runHook postCheck '' +, configurePhase ? "true" , postInstall ? "" @@ -45,7 +46,12 @@ python.stdenv.mkDerivation (attrs // { buildInputs = [ python wrapPython setuptools ] ++ buildInputs ++ pythonPath; - builder = ./builder.sh; + buildInputStrings = map toString buildInputs; + + configurePhase = '' + export PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}:$PYTHONPATH" + ${configurePhase} + ''; pythonPath = [ setuptools] ++ pythonPath;