mpi4py: disabling tests

This commit is contained in:
Samuel Leathers 2017-09-15 12:11:45 -04:00 committed by Franz Pletz
parent 34b1e4c3db
commit 2f9cb45bd4
2 changed files with 27 additions and 5 deletions

View File

@ -1,26 +1,32 @@
{ stdenv, fetchurl, python, buildPythonPackage, mpi, openssh, isPy3k, isPyPy }:
{ stdenv, fetchPypi, python, buildPythonPackage, mpi, openssh, isPy3k, isPyPy }:
buildPythonPackage rec {
pname = "mpi4py";
version = "2.0.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://bitbucket.org/mpi4py/mpi4py/downloads/${name}.tar.gz";
sha256 = "6543a05851a7aa1e6d165e673d422ba24e45c41e4221f0993fe1e5924a00cb81";
src = fetchPypi {
inherit pname version;
sha256 = "10fb01595rg17ycz08a23v24akm25d13srsy2rnixam7a5ca0hv5";
};
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`.
patchPhase = ''
prePatch = ''
sed 's/err = main(cmd.args or \[\])/err = main(cmd.args or ["-v", "-e", "test_spawn"])/' -i setup.py
'';
@ -49,6 +55,9 @@ buildPythonPackage rec {
disabled = isPy3k || isPyPy;
# Timing out communicating between processes when sandboxing enabled.
doCheck = false;
meta = {
description =
"Python bindings for the Message Passing Interface standard";

View File

@ -0,0 +1,13 @@
diff --git i/test/test_dl.py w/test/test_dl.py
index a3211a3..9d25569 100644
--- i/test/test_dl.py
+++ w/test/test_dl.py
@@ -12,7 +12,7 @@ class TestDL(unittest.TestCase):
if sys.platform == 'darwin':
libm = 'libm.dylib'
else:
- libm = 'libm.so'
+ libm = 'libm.so.6'
handle = dl.dlopen(libm, dl.RTLD_LOCAL|dl.RTLD_LAZY)
self.assertTrue(handle != 0)