1{ stdenv
2, lib
3, buildPythonPackage
4, fetchFromGitHub
5, pythonOlder
6
7, asdf
8, astropy
9, astropy-helpers
10, beautifulsoup4
11, drms
12, glymur
13, hypothesis
14, matplotlib
15, numpy
16, pandas
17, parfive
18, pytest-astropy
19, pytest-mock
20, pytestcov
21, python-dateutil
22, scikitimage
23, scipy
24, sqlalchemy
25, towncrier
26, tqdm
27, zeep
28}:
29
30buildPythonPackage rec {
31 pname = "sunpy";
32 version = "1.0.6";
33 disabled = pythonOlder "3.6";
34
35 src = fetchFromGitHub {
36 owner = "sunpy";
37 repo = pname;
38 rev = "v${version}";
39 sha256 = "0j2yfhfxgi95rig8cfp9lvszb7694gq90jvs0xrb472hwnzgh2sk";
40 };
41
42 propagatedBuildInputs = [
43 numpy
44 scipy
45 matplotlib
46 pandas
47 astropy
48 astropy-helpers
49 parfive
50 sqlalchemy
51 scikitimage
52 towncrier
53 glymur
54 beautifulsoup4
55 drms
56 python-dateutil
57 zeep
58 tqdm
59 asdf
60 ];
61
62 checkInputs = [
63 hypothesis
64 pytest-astropy
65 pytestcov
66 pytest-mock
67 ];
68
69 preBuild = ''
70 export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
71 export HOME=$(mktemp -d)
72 '';
73
74 # darwin has write permission issues
75 doCheck = stdenv.isLinux;
76 # ignore documentation tests
77 checkPhase = ''
78 pytest sunpy -k 'not rst'
79 '';
80
81 meta = with lib; {
82 description = "SunPy: Python for Solar Physics";
83 homepage = "https://sunpy.org";
84 license = licenses.bsd2;
85 maintainers = [ maintainers.costrouc ];
86 };
87}