about summary refs log tree commit diff
path: root/pkgs/development/python-modules/aplpy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/aplpy/default.nix')
-rw-r--r--pkgs/development/python-modules/aplpy/default.nix51
1 files changed, 32 insertions, 19 deletions
diff --git a/pkgs/development/python-modules/aplpy/default.nix b/pkgs/development/python-modules/aplpy/default.nix
index 7461c502a31de..47a1de3c0d8d6 100644
--- a/pkgs/development/python-modules/aplpy/default.nix
+++ b/pkgs/development/python-modules/aplpy/default.nix
@@ -1,20 +1,21 @@
 { lib
-, buildPythonPackage
-, fetchPypi
-, fetchpatch
-, numpy
 , astropy
 , astropy-helpers
+, buildPythonPackage
+, cython
+, fetchpatch
+, fetchPypi
 , matplotlib
-, reproject
+, numpy
+, pillow
 , pyavm
 , pyregion
-, pillow
+, pytest-astropy
+, pytestCheckHook
+, pythonOlder
+, reproject
 , scikitimage
-, cython
 , shapely
-, pytest
-, pytest-astropy
 }:
 
 buildPythonPackage rec {
@@ -22,36 +23,48 @@ buildPythonPackage rec {
   version = "2.1.0";
   format = "pyproject";
 
+  disabled = pythonOlder "3.6";
+
   src = fetchPypi {
     pname = "aplpy";
     inherit version;
-    sha256 = "sha256-KCdmBwQWt7IfHsjq7pWlbSISEpfQZDyt+SQSTDaUCV4=";
+    hash = "sha256-KCdmBwQWt7IfHsjq7pWlbSISEpfQZDyt+SQSTDaUCV4=";
   };
 
+  nativeBuildInputs = [
+    astropy-helpers
+  ];
+
   propagatedBuildInputs = [
-    numpy
-    cython
     astropy
+    cython
     matplotlib
-    reproject
+    numpy
+    pillow
     pyavm
     pyregion
-    pillow
+    reproject
     scikitimage
     shapely
   ];
 
-  nativeBuildInputs = [ astropy-helpers ];
-  checkInputs = [ pytest pytest-astropy ];
+  checkInputs = [
+    pytest-astropy
+    pytestCheckHook
+  ];
 
-  checkPhase = ''
-    OPENMP_EXPECTED=0 pytest aplpy
+  preCheck = ''
+    OPENMP_EXPECTED=0
   '';
 
+  pythonImportsCheck = [
+    "aplpy"
+  ];
+
   meta = with lib; {
     description = "The Astronomical Plotting Library in Python";
     homepage = "http://aplpy.github.io";
     license = licenses.mit;
-    maintainers = [ maintainers.smaret ];
+    maintainers = with maintainers; [ smaret ];
   };
 }