1{ lib
2, stdenv
3, aplpy
4, astropy
5, astropy-helpers
6, buildPythonPackage
7, casa-formats-io
8, dask
9, fetchPypi
10, joblib
11, pytest-astropy
12, pytestCheckHook
13, pythonOlder
14, radio_beam
15, setuptools-scm
16}:
17
18buildPythonPackage rec {
19 pname = "spectral-cube";
20 version = "0.6.2";
21 format = "pyproject";
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-0Fr9PvUShi04z8SUsZE7zHuXZWg4rxt6gwSBb6lr2Pc=";
28 };
29
30 SETUPTOOLS_SCM_PRETEND_VERSION = version;
31
32 nativeBuildInputs = [
33 setuptools-scm
34 ];
35
36 propagatedBuildInputs = [
37 astropy
38 casa-formats-io
39 radio_beam
40 joblib
41 dask
42 ];
43
44 nativeCheckInputs = [
45 aplpy
46 pytest-astropy
47 pytestCheckHook
48 ];
49
50 # On x86_darwin, this test fails with "Fatal Python error: Aborted"
51 # when sandbox = true.
52 disabledTestPaths = lib.optionals stdenv.isDarwin [
53 "spectral_cube/tests/test_visualization.py"
54 ];
55
56 pythonImportsCheck = [
57 "spectral_cube"
58 ];
59
60 meta = with lib; {
61 description = "Library for reading and analyzing astrophysical spectral data cubes";
62 homepage = "https://spectral-cube.readthedocs.io";
63 changelog = "https://github.com/radio-astro-tools/spectral-cube/releases/tag/v${version}";
64 license = licenses.bsd3;
65 maintainers = with maintainers; [ smaret ];
66 # Tests fail to start, according to Hydra
67 broken = true;
68 };
69}