[Nix-dev] Patch for pythonPackages.numpy

Konrad Hinsen konrad.hinsen at fastmail.net
Mon Apr 30 16:24:18 CEST 2012


Peter Simons writes:

 >  > Building NumPy on MacOS fails with the current state of nixpkgs, and I
 >  > suspect it can fail on other platforms as well, as the problems I found
 >  > are not specific to MacOS. With the attached patch, it builds correctly,
 >  > at least under MacOS.
 > 
 > I applied your patch in r33941, but that change caused build failures
 > for matplotlib on Linux (and probably on other platforms as well which
 > Hydra doesn't automatically check):
 > 
 >   http://hydra.nixos.org/build/2490567
 > 
 > Do you by chance know how to fix these problems?

The error message "You must install numpy 1.1 or later to build" can
only have one cause: an "import numpy" failed during installation of
matplotlib.  And that means that the numpy in your Nix store is not on
PYTHONPATH when matplotlib is built. I haven't yet studied how Nix
handles Python packages, so I'd better shut up now. Meaning that I
don't have a solution at this time.

Note that matplotlib fails to build under MacOS because some of its
dependencies fail, so I can't analyze the problem myself for now.

Are you sure that matplotlib builds correctly without my patch for
NumPy? It doesn't affect the accessibility of NumPy at all, so I don't
see what could be the problem. It could potentially cause a build
failure for NumPy, but not for matplotlib.

BTW, my NumPy patch mainly removes the default directories for library
searches. Matplotlib needs a similar patch as well, the evidence being
the line

   basedirlist is: ['/usr/local', '/usr']

I'll look into that when I get the dependencies to build.

Konrad.


More information about the nix-dev mailing list