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 , buildPythonPackage
, astropy , astropy
, radio_beam , radio_beam
, pytest }: , pytest
, pytest-astropy
, astropy-helpers
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "spectral-cube"; pname = "spectral-cube";
version = "0.4.4"; version = "0.4.4";
doCheck = false; # the tests requires several pytest plugins that are not in nixpkgs
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "9051ede204b1e25b6358b5e0e573b624ec0e208c24eb03a7ed4925b745c93b5e"; 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 = { meta = {
description = "Library for reading and analyzing astrophysical spectral data cubes"; description = "Library for reading and analyzing astrophysical spectral data cubes";