2018-05-28 11:50:10 +01:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, astropy
|
|
|
|
, radio_beam
|
2019-07-23 11:15:59 +01:00
|
|
|
, pytest
|
|
|
|
, pytest-astropy
|
|
|
|
, astropy-helpers
|
|
|
|
}:
|
2018-05-28 11:50:10 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "spectral-cube";
|
2019-02-26 08:19:39 +00:00
|
|
|
version = "0.4.4";
|
2018-05-28 11:50:10 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-02-26 08:19:39 +00:00
|
|
|
sha256 = "9051ede204b1e25b6358b5e0e573b624ec0e208c24eb03a7ed4925b745c93b5e";
|
2018-05-28 11:50:10 +01:00
|
|
|
};
|
|
|
|
|
2019-07-23 11:15:59 +01:00
|
|
|
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
|
|
|
|
'';
|
2018-05-28 11:50:10 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Library for reading and analyzing astrophysical spectral data cubes";
|
|
|
|
homepage = http://radio-astro-tools.github.io;
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
maintainers = with lib.maintainers; [ smaret ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|