3 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 7
7
8
8
# passthru
9
9
conduit ,
10
+ python3Packages ,
10
11
nix-update-script ,
11
12
12
13
mpiSupport ? false ,
@@ -50,6 +51,8 @@ stdenv.mkDerivation (finalAttrs: {
50
51
passthru = {
51
52
tests = {
52
53
withMpi = conduit . override { mpiSupport = true ; } ;
54
+ pythonModule = python3Packages . conduit ;
55
+ pythonModuleWithMpi = python3Packages . conduit . override { mpiSupport = true ; } ;
53
56
} ;
54
57
updateScript = nix-update-script { } ;
55
58
} ;
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change @@ -2646,6 +2646,10 @@ self: super: with self; {
2646
2646
2647
2647
conda-package-streaming = callPackage ../development/python-modules/conda-package-streaming { };
2648
2648
2649
+ conduit = callPackage ../development/python-modules/conduit { };
2650
+
2651
+ conduit-mpi = callPackage ../development/python-modules/conduit { mpiSupport = true; };
2652
+
2649
2653
confection = callPackage ../development/python-modules/confection { };
2650
2654
2651
2655
configargparse = callPackage ../development/python-modules/configargparse { };
0 commit comments