summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorSamuel Leathers <sam@appliedtrust.com>2017-09-15 12:11:45 -0400
committerFranz Pletz <fpletz@fnordicwalking.de>2017-09-18 15:11:14 +0200
commit2f9cb45bd464643a29e2c61e54e141c202950395 (patch)
treed199e30dd0dac39c8840be67acc0dc08b7f1b66c /pkgs/development
parent34b1e4c3db111ebd8c3c3ca92b70038250bfc72c (diff)
downloadnixlib-2f9cb45bd464643a29e2c61e54e141c202950395.tar
nixlib-2f9cb45bd464643a29e2c61e54e141c202950395.tar.gz
nixlib-2f9cb45bd464643a29e2c61e54e141c202950395.tar.bz2
nixlib-2f9cb45bd464643a29e2c61e54e141c202950395.tar.lz
nixlib-2f9cb45bd464643a29e2c61e54e141c202950395.tar.xz
nixlib-2f9cb45bd464643a29e2c61e54e141c202950395.tar.zst
nixlib-2f9cb45bd464643a29e2c61e54e141c202950395.zip
mpi4py: disabling tests
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/mpi4py/default.nix19
-rw-r--r--pkgs/development/python-modules/mpi4py/tests.patch13
2 files changed, 27 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/mpi4py/default.nix b/pkgs/development/python-modules/mpi4py/default.nix
index 068162dd6922..7e54240941d6 100644
--- a/pkgs/development/python-modules/mpi4py/default.nix
+++ b/pkgs/development/python-modules/mpi4py/default.nix
@@ -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";
diff --git a/pkgs/development/python-modules/mpi4py/tests.patch b/pkgs/development/python-modules/mpi4py/tests.patch
new file mode 100644
index 000000000000..168e3b4b38d3
--- /dev/null
+++ b/pkgs/development/python-modules/mpi4py/tests.patch
@@ -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)