python3Packages.vtk: use pythonRecompileBytecodeHook

This commit is contained in:
qbisi 2025-08-15 08:35:58 +08:00
parent e92102e909
commit 8833a76d2c

View File

@ -140,7 +140,10 @@ stdenv.mkDerivation (finalAttrs: {
cmake
pkg-config # required for finding MySQl
]
++ lib.optional pythonSupport python3Packages.python
++ lib.optionals pythonSupport [
python3Packages.python
python3Packages.pythonRecompileBytecodeHook
]
++ lib.optional (
pythonSupport && stdenv.buildPlatform == stdenv.hostPlatform
) python3Packages.pythonImportsCheckHook;
@ -288,11 +291,6 @@ stdenv.mkDerivation (finalAttrs: {
(vtkBool "VTK_GROUP_ENABLE_MPI" mpiSupport)
];
# byte-compile python modules since the CMake build does not do it
postInstall = lib.optionalString pythonSupport ''
python -m compileall -s $out $out/${python3Packages.python.sitePackages}
'';
pythonImportsCheck = [ "vtk" ];
dontWrapQtApps = true;