From 477c148ae72498db74379358b6fb3c37c3bc9741 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 26 May 2025 15:31:19 +0200 Subject: [PATCH] python3Packages.meep: cleanup - move python dependencies into `dependencies` - use add distutils instead of patching them in - use python.interpreter directly --- pkgs/development/python-modules/meep/default.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/meep/default.nix b/pkgs/development/python-modules/meep/default.nix index 16920fd860be..472e84c2edb2 100644 --- a/pkgs/development/python-modules/meep/default.nix +++ b/pkgs/development/python-modules/meep/default.nix @@ -28,6 +28,7 @@ cython, autograd, mpi4py, + distutils, }: assert !blas.isILP64; @@ -46,12 +47,6 @@ buildPythonPackage rec { format = "other"; - # https://github.com/NanoComp/meep/issues/2819 - postPatch = lib.optionalString (!pythonOlder "3.12") '' - substituteInPlace configure.ac doc/docs/setup.py python/visualization.py \ - --replace-fail "distutils" "setuptools._distutils" - ''; - # MPI is needed in nativeBuildInputs too, otherwise MPI libs will be missing # at runtime nativeBuildInputs = [ @@ -76,9 +71,10 @@ buildPythonPackage rec { mpb ]; - propagatedBuildInputs = + propagatedBuildInputs = [ mpi ]; + + dependencies = [ - mpi numpy scipy matplotlib @@ -89,6 +85,7 @@ buildPythonPackage rec { ] ++ lib.optionals (!pythonOlder "3.12") [ setuptools # used in python/visualization.py + distutils ]; propagatedUserEnvPkgs = [ mpi ]; @@ -100,7 +97,7 @@ buildPythonPackage rec { preConfigure = '' export HDF5_MPI=ON - export PYTHON=${python}/bin/${python.executable}; + export PYTHON=${python.interpreter}; ''; configureFlags = [