mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
h5py: New package, version 2.3.1
A pythonic interface to the hdf5 library. It also supports parallel hdf5.
This commit is contained in:
parent
63c062947e
commit
3c6afb3496
43
pkgs/development/python-modules/h5py/default.nix
Normal file
43
pkgs/development/python-modules/h5py/default.nix
Normal file
@ -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;
|
||||
};
|
||||
}
|
@ -89,6 +89,19 @@ rec {
|
||||
'';
|
||||
};
|
||||
|
||||
h5py = callPackage ../development/python-modules/h5py {
|
||||
inherit (pkgs) stdenv fetchurl;
|
||||
inherit python buildPythonPackage cython numpy;
|
||||
hdf5 = pkgs.hdf5.override { mpi = null; };
|
||||
};
|
||||
|
||||
h5py-mpi = h5py.override {
|
||||
mpiSupport = true;
|
||||
mpi = pkgs.openmpi;
|
||||
hdf5 = pkgs.hdf5.override { mpi = pkgs.openmpi; enableShared = true; };
|
||||
inherit mpi4py;
|
||||
};
|
||||
|
||||
ipython = import ../shells/ipython {
|
||||
inherit (pkgs) stdenv fetchurl sip pyqt4;
|
||||
inherit buildPythonPackage pythonPackages;
|
||||
|
Loading…
Reference in New Issue
Block a user