python312Packages.mpi4py: 3.1.6 -> 3.1.6-unstable-2024-07-08; rewrite
This commit is contained in:
parent
32bd063789
commit
b306e0edf2
@ -1,61 +1,62 @@
|
||||
{
|
||||
lib,
|
||||
fetchPypi,
|
||||
python,
|
||||
fetchFromGitHub,
|
||||
buildPythonPackage,
|
||||
cython,
|
||||
setuptools,
|
||||
mpi,
|
||||
mpiCheckPhaseHook,
|
||||
openssh,
|
||||
pytestCheckHook,
|
||||
mpiCheckPhaseHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mpi4py";
|
||||
version = "3.1.6";
|
||||
format = "setuptools";
|
||||
# See https://github.com/mpi4py/mpi4py/issues/386 . Part of the changes since
|
||||
# the last release include Python 3.12 fixes.
|
||||
version = "3.1.6-unstable-2024-07-08";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-yPpiXg+SsILvlVv7UvGfpmkdKSc9fXETXSlaoUPe5ss=";
|
||||
src = fetchFromGitHub {
|
||||
repo = "mpi4py";
|
||||
owner = "mpi4py";
|
||||
rev = "e9a59719bbce1b9c351e1e30ecd3be3b459e97cd";
|
||||
hash = "sha256-C/nidWGr8xsLV73u7HRtnXoQgYmoRJkD45DFrdXXTPI=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
cython
|
||||
setuptools
|
||||
mpi
|
||||
];
|
||||
dependencies = [
|
||||
mpi
|
||||
];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
openssh
|
||||
mpiCheckPhaseHook
|
||||
];
|
||||
# Most tests pass, (besides `test_spawn.py`), but when reaching ~80% tests
|
||||
# progress, an orted process hangs and the tests don't finish. This issue is
|
||||
# probably due to the sandbox.
|
||||
doCheck = false;
|
||||
disabledTestPaths = [
|
||||
# Almost all tests in this file fail (TODO: Report about this upstream..)
|
||||
"test/test_spawn.py"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit mpi;
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace test/test_spawn.py --replace \
|
||||
"unittest.skipMPI('openmpi(<3.0.0)')" \
|
||||
"unittest.skipMPI('openmpi')"
|
||||
'';
|
||||
|
||||
configurePhase = "";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/${python.sitePackages}"
|
||||
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
||||
|
||||
${python}/bin/${python.executable} setup.py install \
|
||||
--install-lib=$out/${python.sitePackages} \
|
||||
--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
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ mpi ];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
nativeCheckInputs = [
|
||||
openssh
|
||||
mpiCheckPhaseHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Python bindings for the Message Passing Interface standard";
|
||||
homepage = "https://github.com/mpi4py/mpi4py";
|
||||
license = licenses.bsd2;
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ doronbehar ];
|
||||
};
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
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…
Reference in New Issue
Block a user