about summary refs log tree commit diff
path: root/pkgs/development/python-modules/Theano
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2020-10-17 20:23:54 +0100
committerRobert Scott <code@humanleg.org.uk>2020-10-17 23:38:37 +0100
commit4a9dba6c444b0eb1933b7495dd373173f0034d55 (patch)
treef9ad3c11b0da1c9c02ab80d0bbce9642a5115f08 /pkgs/development/python-modules/Theano
parenta60ed8e2db86d7a8f341b39e48ccfd423eaa7b0d (diff)
python3Packages.Theano: add pythonImportsCheck
this not only gives us a "hint" of test coverage, but also proves the fix
from #97597 allows import of theano from within a sandboxed build
Diffstat (limited to 'pkgs/development/python-modules/Theano')
-rw-r--r--pkgs/development/python-modules/Theano/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/Theano/default.nix b/pkgs/development/python-modules/Theano/default.nix
index cc2b681e415dd..ce32e42e4716f 100644
--- a/pkgs/development/python-modules/Theano/default.nix
+++ b/pkgs/development/python-modules/Theano/default.nix
@@ -68,7 +68,9 @@ in buildPythonPackage rec {
       --replace 'StrParam(default_dnn_base_path)' 'StrParam('\'''${cudnn}'\''')'
   '';
 
-  preCheck = ''
+  # needs to be postFixup so it runs before pythonImportsCheck even when
+  # doCheck = false (meaning preCheck would be disabled)
+  postFixup = ''
     mkdir -p check-phase
     export HOME=$(pwd)/check-phase
   '';
@@ -81,6 +83,8 @@ in buildPythonPackage rec {
   checkInputs = [ nose ];
   propagatedBuildInputs = [ numpy numpy.blas scipy six libgpuarray_ ];
 
+  pythonImportsCheck = [ "theano" ];
+
   meta = with stdenv.lib; {
     homepage = "http://deeplearning.net/software/theano/";
     description = "A Python library for large-scale array computation";