python312packages.petsc4py: replace withPetsc4py with pythonSupport

pythonSupport is more commonly used in toPythonModule
This commit is contained in:
qbisi
2025-03-18 20:46:31 +08:00
parent e1b955a3a7
commit 84a09d48d8
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -18,7 +18,7 @@
petsc-scalar-type ? "real",
petsc-precision ? "double",
mpiSupport ? true,
withPetsc4py ? false, # petsc python binding
pythonSupport ? false, # petsc python binding
withExamples ? false,
withFullDeps ? false, # full External libraries support
@@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
pkg-config
]
++ lib.optional mpiSupport mpi
++ lib.optionals withPetsc4py [
++ lib.optionals pythonSupport [
python3Packages.setuptools
python3Packages.cython
];
@@ -88,7 +88,7 @@ stdenv.mkDerivation rec {
++ lib.optional withScalapack scalapack
++ lib.optional withMumps mumps_par;
propagatedBuildInputs = lib.optional withPetsc4py python3Packages.numpy;
propagatedBuildInputs = lib.optional pythonSupport python3Packages.numpy;
patches = [
(replaceVars ./fix-petsc4py-install-prefix.patch {
@@ -113,7 +113,7 @@ stdenv.mkDerivation rec {
"--with-precision=${petsc-precision}"
"--with-mpi=${if mpiSupport then "1" else "0"}"
]
++ lib.optional withPetsc4py "--with-petsc4py=1"
++ lib.optional pythonSupport "--with-petsc4py=1"
++ lib.optionals mpiSupport [
"--CC=mpicc"
"--with-cxx=mpicxx"
+1 -1
View File
@@ -10504,7 +10504,7 @@ self: super: with self; {
petsc4py = toPythonModule (pkgs.petsc.override {
python3 = python;
python3Packages = self;
withPetsc4py = true;
pythonSupport = true;
withFullDeps = true;
});