2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-12-06 16:07:01 +00:00
|
|
|
, stdenv
|
2020-06-15 15:56:04 +00:00
|
|
|
, aplpy
|
2020-04-24 23:36:52 +00:00
|
|
|
, astropy
|
2023-07-15 17:15:38 +00:00
|
|
|
, astropy-helpers
|
|
|
|
, buildPythonPackage
|
2021-12-06 16:07:01 +00:00
|
|
|
, casa-formats-io
|
2021-09-18 10:52:07 +00:00
|
|
|
, dask
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchPypi
|
|
|
|
, joblib
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest-astropy
|
2023-07-15 17:15:38 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, radio_beam
|
2022-02-10 20:34:41 +00:00
|
|
|
, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "spectral-cube";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.6.2";
|
2021-01-05 17:05:55 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-0Fr9PvUShi04z8SUsZE7zHuXZWg4rxt6gwSBb6lr2Pc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
astropy
|
|
|
|
casa-formats-io
|
|
|
|
radio_beam
|
|
|
|
joblib
|
|
|
|
dask
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
aplpy
|
|
|
|
pytest-astropy
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# On x86_darwin, this test fails with "Fatal Python error: Aborted"
|
|
|
|
# when sandbox = true.
|
|
|
|
disabledTestPaths = lib.optionals stdenv.isDarwin [
|
|
|
|
"spectral_cube/tests/test_visualization.py"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"spectral_cube"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library for reading and analyzing astrophysical spectral data cubes";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://spectral-cube.readthedocs.io";
|
|
|
|
changelog = "https://github.com/radio-astro-tools/spectral-cube/releases/tag/v${version}";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ smaret ];
|
2023-10-09 19:29:22 +00:00
|
|
|
# Tests fail to start, according to Hydra
|
|
|
|
broken = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|