nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, pythonOlder
6, asdf
7, astropy
8, setuptools-scm
9, astropy-helpers
10, astropy-extension-helpers
11, beautifulsoup4
12, drms
13, glymur
14, h5netcdf
15, hypothesis
16, matplotlib
17, numpy
18, pandas
19, parfive
20, pytestCheckHook
21, pytest-astropy
22, pytest-mock
23, python-dateutil
24, scikitimage
25, scipy
26, sqlalchemy
27, towncrier
28, tqdm
29, zeep
30}:
31
32buildPythonPackage rec {
33 pname = "sunpy";
34 version = "3.1.6";
35 format = "setuptools";
36
37 disabled = pythonOlder "3.6";
38
39 src = fetchPypi {
40 inherit pname version;
41 sha256 = "sha256-mI5W4EDzTk3GryTQbnmvP+ks3VJDzw4drew9wD9+tIE=";
42 };
43
44 nativeBuildInputs = [
45 astropy-extension-helpers
46 setuptools-scm
47 ];
48
49 propagatedBuildInputs = [
50 asdf
51 astropy
52 astropy-helpers
53 beautifulsoup4
54 drms
55 glymur
56 h5netcdf
57 matplotlib
58 numpy
59 pandas
60 parfive
61 python-dateutil
62 scikitimage
63 scipy
64 sqlalchemy
65 towncrier
66 tqdm
67 zeep
68 ];
69
70 checkInputs = [
71 hypothesis
72 pytest-astropy
73 pytest-mock
74 pytestCheckHook
75 ];
76
77 # darwin has write permission issues
78 doCheck = stdenv.isLinux;
79
80 preCheck = ''
81 export HOME=$(mktemp -d)
82 '';
83
84 disabledTests = [
85 "rst"
86 "test_sunpy_warnings_logging"
87 "test_main_nonexisting_module"
88 "test_main_stdlib_module"
89 ];
90
91 disabledTestPaths = [
92 "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/helioprojective-1.0.0.yaml"
93 "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/heliocentric-1.0.0.yaml"
94 "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/heliographic_carrington-*.yaml"
95 "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/geocentricearthequatorial-1.0.0.yaml"
96 "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/geocentricsolarecliptic-1.0.0.yaml"
97 "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/heliocentricearthecliptic-1.0.0.yaml"
98 "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/heliocentricinertial-1.0.0.yaml"
99 "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/map/generic_map-1.0.0.yaml"
100 # requires mpl-animators package
101 "sunpy/map/tests/test_compositemap.py"
102 "sunpy/map/tests/test_mapbase.py"
103 "sunpy/map/tests/test_mapsequence.py"
104 "sunpy/map/tests/test_plotting.py"
105 "sunpy/map/tests/test_reproject_to.py"
106 "sunpy/net/tests/test_helioviewer.py"
107 "sunpy/timeseries/tests/test_timeseriesbase.py"
108 "sunpy/visualization/animator/tests/test_basefuncanimator.py"
109 "sunpy/visualization/animator/tests/test_mapsequenceanimator.py"
110 "sunpy/visualization/animator/tests/test_wcs.py"
111 "sunpy/visualization/colormaps/tests/test_cm.py"
112 # requires cdflib package
113 "sunpy/timeseries/tests/test_timeseries_factory.py"
114 # distutils is deprecated
115 "sunpy/io/setup_package.py"
116 ];
117
118 pytestFlagsArray = [
119 "-W"
120 "ignore::DeprecationWarning"
121 ];
122
123 # Wants a configuration file
124 # pythonImportsCheck = [
125 # "sunpy"
126 # ];
127
128 meta = with lib; {
129 description = "Python for Solar Physics";
130 homepage = "https://sunpy.org";
131 license = licenses.bsd2;
132 maintainers = with maintainers; [ costrouc ];
133 };
134}