mpi4py: disabling tests
This commit is contained in:
parent
34b1e4c3db
commit
2f9cb45bd4
@ -1,26 +1,32 @@
|
|||||||
{ stdenv, fetchurl, python, buildPythonPackage, mpi, openssh, isPy3k, isPyPy }:
|
{ stdenv, fetchPypi, python, buildPythonPackage, mpi, openssh, isPy3k, isPyPy }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "mpi4py";
|
pname = "mpi4py";
|
||||||
version = "2.0.0";
|
version = "2.0.0";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchPypi {
|
||||||
url = "https://bitbucket.org/mpi4py/mpi4py/downloads/${name}.tar.gz";
|
inherit pname version;
|
||||||
sha256 = "6543a05851a7aa1e6d165e673d422ba24e45c41e4221f0993fe1e5924a00cb81";
|
sha256 = "10fb01595rg17ycz08a23v24akm25d13srsy2rnixam7a5ca0hv5";
|
||||||
};
|
};
|
||||||
|
|
||||||
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.
|
# 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
|
# However, they do pass in a pure, or non-pure nix-shell. Hence, we
|
||||||
# deactivate these particular tests.
|
# deactivate these particular tests.
|
||||||
# Unfortunately, the command-line arguments to `./setup.py test` are not
|
# Unfortunately, the command-line arguments to `./setup.py test` are not
|
||||||
# correctly passed to the test-runner. Hence, these arguments are patched
|
# correctly passed to the test-runner. Hence, these arguments are patched
|
||||||
# directly into `setup.py`.
|
# 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
|
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;
|
disabled = isPy3k || isPyPy;
|
||||||
|
|
||||||
|
# Timing out communicating between processes when sandboxing enabled.
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description =
|
description =
|
||||||
"Python bindings for the Message Passing Interface standard";
|
"Python bindings for the Message Passing Interface standard";
|
||||||
|
13
pkgs/development/python-modules/mpi4py/tests.patch
Normal file
13
pkgs/development/python-modules/mpi4py/tests.patch
Normal 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)
|
Loading…
x
Reference in New Issue
Block a user