Skip to content

Commit e94e30e

Browse files
committedMar 19, 2025
python312Packages.conduit[-mpi]: init at 0.9.3
1 parent e803c9d commit e94e30e

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed
 

‎pkgs/by-name/co/conduit/package.nix

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
# passthru
99
conduit,
10+
python3Packages,
1011
nix-update-script,
1112

1213
mpiSupport ? false,
@@ -50,6 +51,8 @@ stdenv.mkDerivation (finalAttrs: {
5051
passthru = {
5152
tests = {
5253
withMpi = conduit.override { mpiSupport = true; };
54+
pythonModule = python3Packages.conduit;
55+
pythonModuleWithMpi = python3Packages.conduit.override { mpiSupport = true; };
5356
};
5457
updateScript = nix-update-script { };
5558
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
lib,
3+
pkgs,
4+
buildPythonPackage,
5+
setuptools,
6+
numpy,
7+
pip,
8+
9+
mpiSupport ? false,
10+
}:
11+
let
12+
conduit = pkgs.conduit.override { inherit mpiSupport; };
13+
in
14+
buildPythonPackage {
15+
inherit (conduit)
16+
pname
17+
version
18+
src
19+
nativeBuildInputs
20+
buildInputs
21+
;
22+
pyproject = true;
23+
24+
# Needed for cmake to find openmpi
25+
strictDeps = false;
26+
27+
postPatch = ''
28+
substituteInPlace setup.py \
29+
--replace-fail \
30+
"'-j2'" \
31+
"f'-j{os.environ.get(\"NIX_BUILD_CORES\")}'"
32+
'';
33+
34+
dontUseCmakeConfigure = true;
35+
36+
env.ENABLE_MPI = mpiSupport;
37+
38+
build-system = [
39+
setuptools
40+
numpy
41+
pip
42+
];
43+
44+
pythonImportsCheck = [ "conduit" ];
45+
46+
# No python tests
47+
doCheck = false;
48+
49+
meta = {
50+
description = "Python bindings for the conduit library";
51+
inherit (conduit.meta)
52+
homepage
53+
changelog
54+
license
55+
platforms
56+
;
57+
maintainers = with lib.maintainers; [ GaetanLepage ];
58+
};
59+
}

‎pkgs/top-level/python-packages.nix

+4
Original file line numberDiff line numberDiff line change
@@ -2646,6 +2646,10 @@ self: super: with self; {
26462646

26472647
conda-package-streaming = callPackage ../development/python-modules/conda-package-streaming { };
26482648

2649+
conduit = callPackage ../development/python-modules/conduit { };
2650+
2651+
conduit-mpi = callPackage ../development/python-modules/conduit { mpiSupport = true; };
2652+
26492653
confection = callPackage ../development/python-modules/confection { };
26502654

26512655
configargparse = callPackage ../development/python-modules/configargparse { };

0 commit comments

Comments
 (0)
Failed to load comments.