about summary refs log tree commit diff
path: root/pkgs/development/python-modules/scipy
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2024-03-24 00:50:39 +0100
committerSandro Jäckel <sandro.jaeckel@gmail.com>2024-03-24 22:07:11 +0100
commit92aca9c6b5516d7959c46ff70cfed22eed510768 (patch)
treedc42e25efe368ac20f9dc230617f39c090041ae8 /pkgs/development/python-modules/scipy
parentcba6cf337c5affee95b82fdd318f47bf286055bd (diff)
python311Packages.scipy: remove references to dev outputs
Diffstat (limited to 'pkgs/development/python-modules/scipy')
-rw-r--r--pkgs/development/python-modules/scipy/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix
index 2870e5ec3bbd9..2a51825830049 100644
--- a/pkgs/development/python-modules/scipy/default.nix
+++ b/pkgs/development/python-modules/scipy/default.nix
@@ -10,6 +10,7 @@
 , cython
 , gfortran
 , meson-python
+, nukeReferences
 , pkg-config
 , pythran
 , wheel
@@ -94,6 +95,7 @@ in buildPythonPackage {
     cython
     gfortran
     meson-python
+    nukeReferences
     pythran
     pkg-config
     wheel
@@ -166,6 +168,12 @@ in buildPythonPackage {
   #
   hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ];
 
+  # remove references to dev dependencies
+  postInstall = ''
+    nuke-refs $out/${python.sitePackages}/scipy/__config__.py
+    rm $out/${python.sitePackages}/scipy/__pycache__/__config__.*.opt-1.pyc
+  '';
+
   preCheck = ''
     export OMP_NUM_THREADS=$(( $NIX_BUILD_CORES / 4 ))
     cd $out