diff options
author | Peter Simons <simons@cryp.to> | 2010-07-28 13:05:04 +0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2010-07-28 13:05:04 +0000 |
commit | 93b18ceb308c01290e90bdb931d53f0e58db1b5f (patch) | |
tree | 43327402a497cf4e69bd2429350580f1697225dc /pkgs/development/python-modules | |
parent | b89f310c7a3347359e66a61a7366db1b70a8b2c3 (diff) | |
download | nixlib-93b18ceb308c01290e90bdb931d53f0e58db1b5f.tar nixlib-93b18ceb308c01290e90bdb931d53f0e58db1b5f.tar.gz nixlib-93b18ceb308c01290e90bdb931d53f0e58db1b5f.tar.bz2 nixlib-93b18ceb308c01290e90bdb931d53f0e58db1b5f.tar.lz nixlib-93b18ceb308c01290e90bdb931d53f0e58db1b5f.tar.xz nixlib-93b18ceb308c01290e90bdb931d53f0e58db1b5f.tar.zst nixlib-93b18ceb308c01290e90bdb931d53f0e58db1b5f.zip |
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
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/generic/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 458a30116ae8..9dad415d8357 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} ''; |