From 93b18ceb308c01290e90bdb931d53f0e58db1b5f Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 28 Jul 2010 13:05:04 +0000 Subject: pkgs/development/python-modules/generic: parameterize build/install command The generic 'buildPythonPackage' function used to use the build/install command "easy_install" unconditionally. That didn't work for python-numpy, for instance, because the package wants "setup.py" run with additional parameters to determine the fortran compiler of choice. The newly introduced function argument 'installCommand' allows to implement this. By passing that parameter, the default build command can be overridden. svn path=/nixpkgs/trunk/; revision=22786 --- pkgs/development/python-modules/generic/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkgs') diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 458a30116ae..9dad415d835 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -6,11 +6,14 @@ { python, setuptools, makeWrapper, lib }: { name, namePrefix ? "python-", src, meta, patches ? [] +, installCommand ? "" , doCheck ? true, checkPhase ? "python setup.py test" , postInstall ? "" , ... } @ attrs: let + defaultInstallCommand = ''easy_install --prefix="$out" .''; + # Return the list of recursively propagated build inputs of PKG. recursiveBuildInputs = pkg: @@ -50,7 +53,7 @@ python.stdenv.mkDerivation ( echo "installing \`${name}' with \`easy_install'..." export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" - easy_install --prefix="$out" . + ${if installCommand == "" then defaultInstallCommand else installCommand} ${postInstall} ''; -- cgit 1.4.1