1{ stdenv, buildPythonPackage, fetchPypi
2, fftw, fftwFloat, fftwLongDouble, numpy, scipy, cython, dask }:
3
4buildPythonPackage rec {
5 version = "0.12.0";
6 pname = "pyFFTW";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "60988e823ca75808a26fd79d88dbae1de3699e72a293f812aa4534f8a0a58cb0";
11 };
12
13 buildInputs = [ fftw fftwFloat fftwLongDouble];
14
15 propagatedBuildInputs = [ numpy scipy cython dask ];
16
17 # Tests cannot import pyfftw. pyfftw works fine though.
18 doCheck = false;
19
20 preConfigure = ''
21 export LDFLAGS="-L${fftw.out}/lib -L${fftwFloat.out}/lib -L${fftwLongDouble.out}/lib"
22 export CFLAGS="-I${fftw.dev}/include -I${fftwFloat.dev}/include -I${fftwLongDouble.dev}/include"
23 '';
24 #+ optionalString isDarwin ''
25 # export DYLD_LIBRARY_PATH="${pkgs.fftw.out}/lib"
26 #'';
27
28 meta = with stdenv.lib; {
29 description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms";
30 homepage = "http://hgomersall.github.com/pyFFTW/";
31 license = with licenses; [ bsd2 bsd3 ];
32 maintainers = with maintainers; [ fridh ];
33 };
34}