petsc/slepc: replace python3 with python3Packages.python

This commit is contained in:
qbisi
2025-09-03 16:45:22 +08:00
parent e13ba1174c
commit 8cb2716492
3 changed files with 4 additions and 9 deletions
+2 -4
View File
@@ -10,7 +10,6 @@
bison,
mpi, # generic mpi dependency
mpiCheckPhaseHook,
python3,
python3Packages,
# Build options
@@ -78,7 +77,6 @@ let
petscPackages = lib.makeScope newScope (self: {
inherit
mpi
python3
python3Packages
# global override options
mpiSupport
@@ -121,10 +119,10 @@ stdenv.mkDerivation (finalAttrs: {
strictDeps = true;
nativeBuildInputs = [
python3
gfortran
pkg-config
bison
python3Packages.python
]
++ lib.optional mpiSupport mpi
++ lib.optionals pythonSupport [
@@ -154,7 +152,7 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
(replaceVars ./fix-petsc4py-install-prefix.patch {
PYTHON_SITEPACKAGES = python3.sitePackages;
PYTHON_SITEPACKAGES = python3Packages.python.sitePackages;
})
];
+2 -3
View File
@@ -2,7 +2,6 @@
lib,
stdenv,
fetchFromGitLab,
python3,
python3Packages,
arpack-mpi,
petsc,
@@ -29,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
# Fix slepc4py install prefix
substituteInPlace config/packages/slepc4py.py \
--replace-fail "slepc.prefixdir,'lib'" \
"slepc.prefixdir,'${python3.sitePackages}'"
"slepc.prefixdir,'${python3Packages.python.sitePackages}'"
patchShebangs lib/slepc/bin
'';
@@ -43,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: {
'';
nativeBuildInputs = [
python3
python3Packages.python
]
++ lib.optionals pythonSupport [
python3Packages.setuptools
-2
View File
@@ -11561,7 +11561,6 @@ self: super: with self; {
petsc4py = toPythonModule (
pkgs.petsc.override {
python3 = python;
python3Packages = self;
pythonSupport = true;
}
@@ -16798,7 +16797,6 @@ self: super: with self; {
slepc4py = toPythonModule (
pkgs.slepc.override {
pythonSupport = true;
python3 = self.python;
python3Packages = self;
petsc = petsc4py;
}