pythonPackages.{h5py, h5py-mpi}: simplify expression/assertions

This commit is contained in:
Frederik Rietdijk 2016-07-19 12:30:31 +02:00
parent 47e66f08e1
commit c51b8dc224
2 changed files with 9 additions and 12 deletions

View File

@ -1,17 +1,16 @@
{ stdenv, fetchurl, python, buildPythonPackage
, numpy, hdf5, cython, six, pkgconfig
, mpiSupport ? false, mpi4py ? null, mpi ? null }:
, mpi4py ? null }:
assert mpiSupport == hdf5.mpiSupport;
assert mpiSupport -> mpi != null
&& mpi4py != null
&& mpi == mpi4py.mpi
&& mpi == hdf5.mpi
;
assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi;
with stdenv.lib;
buildPythonPackage rec {
let
mpi = hdf5.mpi;
mpiSupport = hdf5.mpiSupport;
in buildPythonPackage rec {
name = "h5py-${version}";
version = "2.5.0";

View File

@ -227,13 +227,11 @@ in modules // {
};
h5py = callPackage ../development/python-modules/h5py {
hdf5 = pkgs.hdf5.override { mpi = null; };
hdf5 = pkgs.hdf5;
};
h5py-mpi = self.h5py.override {
mpiSupport = true;
mpi = pkgs.openmpi;
hdf5 = pkgs.hdf5.override { mpi = pkgs.openmpi; enableShared = true; };
hdf5 = pkgs.hdf5-mpi;
};
mpi4py = callPackage ../development/python-modules/mpi4py {