pythonPackages.spectral-cube: add checkPhase

This commit is contained in:
Sébastien Maret 2019-07-23 12:15:59 +02:00 committed by Frederik Rietdijk
parent ee6c007fcc
commit 5e7213b615

View File

@ -3,20 +3,36 @@
, buildPythonPackage
, astropy
, radio_beam
, pytest }:
, pytest
, pytest-astropy
, astropy-helpers
}:
buildPythonPackage rec {
pname = "spectral-cube";
version = "0.4.4";
doCheck = false; # the tests requires several pytest plugins that are not in nixpkgs
src = fetchPypi {
inherit pname version;
sha256 = "9051ede204b1e25b6358b5e0e573b624ec0e208c24eb03a7ed4925b745c93b5e";
};
propagatedBuildInputs = [ astropy radio_beam pytest ];
propagatedBuildInputs = [ astropy radio_beam ];
nativeBuildInputs = [ astropy-helpers ];
checkInputs = [ pytest pytest-astropy ];
# Disable automatic update of the astropy-helper module
postPatch = ''
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
'';
# Tests must be run in the build directory
checkPhase = ''
cd build/lib
pytest
'';
meta = {
description = "Library for reading and analyzing astrophysical spectral data cubes";