mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 15:56:50 +01:00
pythonPackages.spectral-cube: add checkPhase
This commit is contained in:
parent
ee6c007fcc
commit
5e7213b615
1 changed files with 20 additions and 4 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue