2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
aplpy,
|
|
|
|
astropy,
|
|
|
|
buildPythonPackage,
|
|
|
|
casa-formats-io,
|
|
|
|
dask,
|
|
|
|
fetchPypi,
|
|
|
|
joblib,
|
|
|
|
pytest-astropy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
radio-beam,
|
|
|
|
setuptools-scm,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "spectral-cube";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.6.5";
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-gJzrr3+/FsQN/HHDERxf/NECArwOaTqFwmI/Q2Z9HTM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
astropy
|
|
|
|
casa-formats-io
|
2023-11-16 04:20:00 +00:00
|
|
|
radio-beam
|
2023-07-15 17:15:38 +00:00
|
|
|
joblib
|
|
|
|
dask
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
aplpy
|
|
|
|
pytest-astropy
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# Tests must be run in the build directory.
|
|
|
|
preCheck = ''
|
|
|
|
cd build/lib
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# On x86_darwin, this test fails with "Fatal Python error: Aborted"
|
|
|
|
# when sandbox = true.
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTestPaths = lib.optionals stdenv.isDarwin [ "spectral_cube/tests/test_visualization.py" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "spectral_cube" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
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 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|