about summary refs log tree commit diff
path: root/pkgs/development/python-modules/mpi4py
diff options
context:
space:
mode:
authorAndreas Herrmann <andreash87@gmx.ch>2014-07-01 16:46:15 +0200
committerAndreas Herrmann <andreash87@gmx.ch>2014-07-18 22:41:56 +0200
commit63c062947eb765e4a02bc892e1891da7057fdfec (patch)
treea192ff52accadbf053b5503e408dc866dea57cdf /pkgs/development/python-modules/mpi4py
parent37b064fcc713ddd88e5c3dd297fabf12b7725c1f (diff)
downloadnixlib-63c062947eb765e4a02bc892e1891da7057fdfec.tar
nixlib-63c062947eb765e4a02bc892e1891da7057fdfec.tar.gz
nixlib-63c062947eb765e4a02bc892e1891da7057fdfec.tar.bz2
nixlib-63c062947eb765e4a02bc892e1891da7057fdfec.tar.lz
nixlib-63c062947eb765e4a02bc892e1891da7057fdfec.tar.xz
nixlib-63c062947eb765e4a02bc892e1891da7057fdfec.tar.zst
nixlib-63c062947eb765e4a02bc892e1891da7057fdfec.zip
mpi4py: New package, version 1.3.1
Python wrapper for the message passing interface standard.

Currently building without mpe, or vampir-trace support.
Diffstat (limited to 'pkgs/development/python-modules/mpi4py')
-rw-r--r--pkgs/development/python-modules/mpi4py/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/mpi4py/default.nix b/pkgs/development/python-modules/mpi4py/default.nix
new file mode 100644
index 000000000000..74d46def9074
--- /dev/null
+++ b/pkgs/development/python-modules/mpi4py/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchurl, python, buildPythonPackage, mpi, openssh }:
+
+buildPythonPackage rec {
+  name = "mpi4py-1.3.1";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/mpi4py/mpi4py/downloads/${name}.tar.gz";
+    sha256 = "e7bd2044aaac5a6ea87a87b2ecc73b310bb6efe5026031e33067ea3c2efc3507";
+  };
+
+  passthru = {
+    inherit mpi;
+  };
+
+  configurePhase = "";
+
+  installPhase = ''
+    mkdir -p "$out/lib/${python.libPrefix}/site-packages"
+    export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
+
+    ${python}/bin/${python.executable} setup.py install \
+      --install-lib=$out/lib/${python.libPrefix}/site-packages \
+      --prefix="$out"
+
+    # --install-lib:
+    # sometimes packages specify where files should be installed outside the usual
+    # python lib prefix, we override that back so all infrastructure (setup hooks)
+    # work as expected
+  '';
+
+  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 ];
+
+  meta = {
+    description = "
+      Provides Python bindings for the Message Passing Interface standard.
+    ";
+    homepage = "http://code.google.com/p/mpi4py/";
+    license = stdenv.lib.licenses.bsd3;
+  };
+}