pythonPackages.mpi4py: 2.0.0 -> 3.0.0

Tests run with sandboxing enabled again and we can remove some of the fixes as
they aren't necessary anymore.

PyPy and Python 3 are also supported.
This commit is contained in:
André-Patrick Bubel 2017-11-15 13:46:49 +01:00
parent f46003798e
commit fb8ff9eaf8
No known key found for this signature in database
GPG Key ID: 28925CBA8869FF29

View File

@ -1,35 +1,19 @@
{ stdenv, fetchPypi, python, buildPythonPackage, mpi, openssh, isPy3k, isPyPy }:
{ stdenv, fetchPypi, python, buildPythonPackage, mpi }:
buildPythonPackage rec {
pname = "mpi4py";
version = "2.0.0";
version = "3.0.0";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "10fb01595rg17ycz08a23v24akm25d13srsy2rnixam7a5ca0hv5";
sha256 = "1mzgd26dfv4vwbci8gq77ss9f0x26i9aqzq9b9vs9ndxhlnv0mxl";
};
passthru = {
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 = "";
installPhase = ''
@ -49,14 +33,6 @@ buildPythonPackage rec {
setupPyBuildFlags = ["--mpicc=${mpi}/bin/mpicc"];
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 = {
description =