mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 16:24:10 +00:00
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
This commit is contained in:
parent
b89f310c7a
commit
93b18ceb30
@ -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}
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user