at master 3.3 kB view raw
1{ 2 lib, 3 stdenv, 4 asdf, 5 astropy, 6 astropy-extension-helpers, 7 astropy-helpers, 8 beautifulsoup4, 9 buildPythonPackage, 10 drms, 11 fetchPypi, 12 glymur, 13 h5netcdf, 14 hypothesis, 15 lxml, 16 matplotlib, 17 numpy, 18 pandas, 19 parfive, 20 pytest-astropy, 21 pytestCheckHook, 22 pytest-mock, 23 python-dateutil, 24 pythonOlder, 25 scikit-image, 26 scipy, 27 setuptools-scm, 28 sqlalchemy, 29 tqdm, 30 zeep, 31}: 32 33buildPythonPackage rec { 34 pname = "sunpy"; 35 version = "7.0.1"; 36 format = "setuptools"; 37 38 disabled = pythonOlder "3.8"; 39 40 src = fetchPypi { 41 inherit pname version; 42 hash = "sha256-9ZCG9CtTpgGGlqtXcl2epRBzFcbVvIMzZcXk5CQ5/+A="; 43 }; 44 45 nativeBuildInputs = [ 46 astropy-extension-helpers 47 setuptools-scm 48 ]; 49 50 propagatedBuildInputs = [ 51 astropy 52 astropy-helpers 53 numpy 54 parfive 55 ]; 56 57 optional-dependencies = { 58 asdf = [ 59 asdf 60 # asdf-astropy 61 ]; 62 database = [ sqlalchemy ]; 63 image = [ 64 scikit-image 65 scipy 66 ]; 67 net = [ 68 beautifulsoup4 69 drms 70 python-dateutil 71 tqdm 72 zeep 73 ]; 74 jpeg2000 = [ 75 glymur 76 lxml 77 ]; 78 timeseries = [ 79 # cdflib 80 h5netcdf 81 # h5py 82 matplotlib 83 pandas 84 ]; 85 }; 86 87 nativeCheckInputs = [ 88 hypothesis 89 pytest-astropy 90 pytest-mock 91 pytestCheckHook 92 ] 93 ++ optional-dependencies.asdf 94 ++ optional-dependencies.database 95 ++ optional-dependencies.image 96 ++ optional-dependencies.net 97 ++ optional-dependencies.timeseries; 98 99 postPatch = '' 100 substituteInPlace setup.cfg \ 101 --replace " --dist no" "" 102 ''; 103 104 # darwin has write permission issues 105 doCheck = stdenv.hostPlatform.isLinux; 106 107 preCheck = '' 108 export HOME=$(mktemp -d) 109 ''; 110 111 disabledTests = [ 112 "rst" 113 "test_sunpy_warnings_logging" 114 "test_main_nonexisting_module" 115 "test_main_stdlib_module" 116 "test_find_dependencies" 117 ]; 118 119 disabledTestPaths = [ 120 # Tests are very slow 121 "sunpy/net/tests/test_fido.py" 122 # asdf.extensions plugin issue 123 "sunpy/io/special/asdf/resources/schemas/" 124 "sunpy/io/special/asdf/resources/manifests/sunpy-1.0.0.yaml" 125 # Requires mpl-animators package 126 "sunpy/map/tests/test_compositemap.py" 127 "sunpy/map/tests/test_mapbase.py" 128 "sunpy/map/tests/test_mapsequence.py" 129 "sunpy/map/tests/test_plotting.py" 130 "sunpy/map/tests/test_reproject_to.py" 131 "sunpy/net/tests/test_helioviewer.py" 132 "sunpy/timeseries/tests/test_timeseriesbase.py" 133 "sunpy/visualization/animator/tests/test_basefuncanimator.py" 134 "sunpy/visualization/animator/tests/test_mapsequenceanimator.py" 135 "sunpy/visualization/animator/tests/test_wcs.py" 136 "sunpy/visualization/colormaps/tests/test_cm.py" 137 # Requires cdflib package 138 "sunpy/timeseries/tests/test_timeseries_factory.py" 139 # Requires jplephem 140 "sunpy/image/tests/test_transform.py" 141 "sunpy/io/special/asdf/tests/test_coordinate_frames.py" 142 "sunpy/io/special/asdf/tests/test_genericmap.py" 143 # distutils is deprecated 144 "sunpy/io/setup_package.py" 145 ]; 146 147 pytestFlags = [ 148 "-Wignore::DeprecationWarning" 149 ]; 150 151 # Wants a configuration file 152 # pythonImportsCheck = [ 153 # "sunpy" 154 # ]; 155 156 meta = with lib; { 157 description = "Python for Solar Physics"; 158 homepage = "https://sunpy.org"; 159 license = licenses.bsd2; 160 maintainers = [ ]; 161 broken = true; 162 }; 163}