diff options
author | Andreas Herrmann <andreash87@gmx.ch> | 2014-08-31 20:02:38 +0200 |
---|---|---|
committer | Andreas Herrmann <andreash87@gmx.ch> | 2014-09-02 13:56:54 +0200 |
commit | 728793ef0bb7dd3ebf0bb4471492eed6f3a1a8ab (patch) | |
tree | 0f5c96bd70604746802c6a5b94359202f1f8436e /pkgs/development/python-modules/h5py | |
parent | 1e786087e4e5bf8d602c87e49edd2fa5d61b8a82 (diff) |
h5py: New package, version 2.3.1
Diffstat (limited to 'pkgs/development/python-modules/h5py')
-rw-r--r-- | pkgs/development/python-modules/h5py/default.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix new file mode 100644 index 0000000000000..9ab68ac4cd2ba --- /dev/null +++ b/pkgs/development/python-modules/h5py/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, python, buildPythonPackage +, numpy, hdf5, cython +, mpiSupport ? false, mpi4py ? null, mpi ? null }: + +assert mpiSupport == hdf5.mpiSupport; +assert mpiSupport -> mpi != null + && mpi4py != null + && mpi == mpi4py.mpi + && mpi == hdf5.mpi + ; + +with stdenv.lib; + +buildPythonPackage rec { + name = "h5py-2.3.1"; + + src = fetchurl { + url = "https://pypi.python.org/packages/source/h/h5py/${name}.tar.gz"; + md5 = "8f32f96d653e904d20f9f910c6d9dd91"; + }; + + setupPyBuildFlags = [ "--hdf5=${hdf5}" ] + ++ optional mpiSupport "--mpi" + ; + setupPyInstallFlags = setupPyBuildFlags; + + preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else ""; + + buildInputs = [ hdf5 cython ] + ++ optional mpiSupport mpi + ; + propagatedBuildInputs = [ numpy ] + ++ optional mpiSupport mpi4py + ; + + meta = { + description = " + The h5py package is a Pythonic interface to the HDF5 binary data format. + "; + homepage = "http://www.h5py.org/"; + license = stdenv.lib.licenses.bsd2; + }; +} |