Merge pull request #11359 from FRidh/fftw

python FFTW bindings.
This commit is contained in:
Domen Kožar 2015-12-11 14:29:01 +01:00
commit 710f603d2b
3 changed files with 35 additions and 1 deletions

View File

@ -20,7 +20,8 @@ stdenv.mkDerivation rec {
]
++ optional (precision != "double") "--enable-${precision}"
# all x86_64 have sse2
++ optional stdenv.isx86_64 "--enable-sse2"
# however, not all float sizes fit
++ optional (stdenv.isx86_64 && (precision == "single" || precision == "double") ) "--enable-sse2"
++ optional stdenv.cc.isGNU "--enable-openmp";
enableParallelBuilding = true;

View File

@ -6355,6 +6355,7 @@ let
fftw = callPackage ../development/libraries/fftw { };
fftwSinglePrec = fftw.override { precision = "single"; };
fftwFloat = fftwSinglePrec; # the configure option is just an alias
fftwLongDouble = fftw.override { precision = "long-double"; };
filter-audio = callPackage ../development/libraries/filter-audio {};

View File

@ -14544,6 +14544,38 @@ in modules // {
};
};
pyfftw = buildPythonPackage rec {
name = "pyfftw-${version}";
version = "0.9.2";
src = pkgs.fetchurl {
url = "https://pypi.python.org/packages/source/p/pyFFTW/pyFFTW-${version}.tar.gz";
sha256 = "f6bbb6afa93085409ab24885a1a3cdb8909f095a142f4d49e346f2bd1b789074";
};
buildInputs = [ pkgs.fftw pkgs.fftwFloat pkgs.fftwLongDouble];
propagatedBuildInputs = with self; [ numpy scipy ];
# Tests cannot import pyfftw. pyfftw works fine though.
doCheck = false;
preConfigure = ''
export LDFLAGS="-L${pkgs.fftw}/lib -L${pkgs.fftwFloat}/lib -L${pkgs.fftwLongDouble}/lib"
export CFLAGS="-I${pkgs.fftw}/include -I${pkgs.fftwFloat}/include -I${pkgs.fftwLongDouble}/include"
'';
#+ optionalString isDarwin ''
# export DYLD_LIBRARY_PATH="${pkgs.fftw}/lib"
#'';
meta = {
description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms";
homepage = http://hgomersall.github.com/pyFFTW/;
license = with licenses; [ bsd2 bsd3 ];
maintainer = with maintainers; [ fridh ];
};
};
pyfiglet = buildPythonPackage rec {
name = "pyfiglet-${version}";
version = "0.7.2";