Merge master into staging

This commit is contained in:
Frederik Rietdijk
2018-02-11 08:55:28 +01:00
9 changed files with 80 additions and 49 deletions

View File

@@ -2,12 +2,11 @@
buildPythonPackage rec {
pname = "astral";
version = "1.4";
version = "1.5";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "1zm1ypc6w279gh7lbgsfbzfxk2x4gihlq3rfh59hj70hmhjwiwp7";
sha256 = "527628fbfe90c1596c3950ff84ebd07ecc10c8fb1044c903a0519b5057700cb6";
};
propagatedBuildInputs = [ pytz ];

View File

@@ -1,6 +1,6 @@
{ stdenv, fetchurl, python, buildPythonPackage
, numpy, hdf5, cython, six, pkgconfig
, mpi4py ? null }:
, mpi4py ? null, openssh }:
assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi;
@@ -24,6 +24,10 @@ in buildPythonPackage rec {
postConfigure = ''
${python.executable} setup.py configure ${configure_flags}
# Needed to run the tests reliably. See:
# https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30
${optionalString mpiSupport "export OMPI_MCA_rmaps_base_oversubscribe=yes"}
'';
preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else "";
@@ -33,7 +37,7 @@ in buildPythonPackage rec {
++ optional mpiSupport mpi
;
propagatedBuildInputs = [ numpy six]
++ optional mpiSupport mpi4py
++ optionals mpiSupport [ mpi4py openssh ]
;
meta = {

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchPypi, python, buildPythonPackage, mpi }:
{ stdenv, fetchPypi, python, buildPythonPackage, mpi, openssh }:
buildPythonPackage rec {
pname = "mpi4py";
@@ -14,6 +14,12 @@ buildPythonPackage rec {
inherit mpi;
};
postPatch = ''
substituteInPlace test/test_spawn.py --replace \
"unittest.skipMPI('openmpi(<3.0.0)')" \
"unittest.skipMPI('openmpi')"
'';
configurePhase = "";
installPhase = ''
@@ -28,11 +34,15 @@ buildPythonPackage rec {
# 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
# Needed to run the tests reliably. See:
# https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30
export OMPI_MCA_rmaps_base_oversubscribe=yes
'';
setupPyBuildFlags = ["--mpicc=${mpi}/bin/mpicc"];
buildInputs = [ mpi ];
buildInputs = [ mpi openssh ];
meta = {
description =