Merge pull request #31695 from Moredread/mpi4py-3.0.0

pythonPackages.mpi4py: 2.0.0 -> 3.0.0
This commit is contained in:
Samuel Leathers 2017-11-15 09:19:20 -05:00 committed by GitHub
commit 27fbf66c4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,35 +1,19 @@
{ stdenv, fetchPypi, python, buildPythonPackage, mpi, openssh, isPy3k, isPyPy }: { stdenv, fetchPypi, python, buildPythonPackage, mpi }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "mpi4py"; pname = "mpi4py";
version = "2.0.0"; version = "3.0.0";
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "10fb01595rg17ycz08a23v24akm25d13srsy2rnixam7a5ca0hv5"; sha256 = "1mzgd26dfv4vwbci8gq77ss9f0x26i9aqzq9b9vs9ndxhlnv0mxl";
}; };
passthru = { passthru = {
inherit mpi; inherit mpi;
}; };
# Rename libm.so -> libm.so.6 in test
# See: https://bitbucket.org/mpi4py/mpi4py/issues/28/test_dltestdl-test-failure
patches = [
./tests.patch
];
# The tests in the `test_spawn` module fail in the chroot build environment.
# However, they do pass in a pure, or non-pure nix-shell. Hence, we
# deactivate these particular tests.
# Unfortunately, the command-line arguments to `./setup.py test` are not
# correctly passed to the test-runner. Hence, these arguments are patched
# directly into `setup.py`.
prePatch = ''
sed 's/err = main(cmd.args or \[\])/err = main(cmd.args or ["-v", "-e", "test_spawn"])/' -i setup.py
'';
configurePhase = ""; configurePhase = "";
installPhase = '' installPhase = ''
@ -49,14 +33,6 @@ buildPythonPackage rec {
setupPyBuildFlags = ["--mpicc=${mpi}/bin/mpicc"]; setupPyBuildFlags = ["--mpicc=${mpi}/bin/mpicc"];
buildInputs = [ mpi ]; buildInputs = [ mpi ];
# Requires openssh for tests. Tests of dependent packages will also fail,
# if openssh is not present. E.g. h5py with mpi support.
propagatedBuildInputs = [ openssh ];
disabled = isPy3k || isPyPy;
# Timing out communicating between processes when sandboxing enabled.
doCheck = false;
meta = { meta = {
description = description =