2022-01-26 04:04:25 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, asdf
|
2020-08-20 17:08:02 +00:00
|
|
|
, astropy
|
2021-01-05 17:05:55 +00:00
|
|
|
, astropy-extension-helpers
|
2022-06-16 17:23:12 +00:00
|
|
|
, astropy-helpers
|
2020-08-20 17:08:02 +00:00
|
|
|
, beautifulsoup4
|
2022-06-16 17:23:12 +00:00
|
|
|
, buildPythonPackage
|
2020-08-20 17:08:02 +00:00
|
|
|
, drms
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchPypi
|
2020-08-20 17:08:02 +00:00
|
|
|
, glymur
|
2021-05-20 23:08:51 +00:00
|
|
|
, h5netcdf
|
2020-04-24 23:36:52 +00:00
|
|
|
, hypothesis
|
2022-06-16 17:23:12 +00:00
|
|
|
, lxml
|
2020-08-20 17:08:02 +00:00
|
|
|
, matplotlib
|
|
|
|
, numpy
|
|
|
|
, pandas
|
|
|
|
, parfive
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest-astropy
|
2022-06-16 17:23:12 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest-mock
|
2020-08-20 17:08:02 +00:00
|
|
|
, python-dateutil
|
2022-06-16 17:23:12 +00:00
|
|
|
, pythonOlder
|
2020-08-20 17:08:02 +00:00
|
|
|
, scikitimage
|
|
|
|
, scipy
|
2022-06-16 17:23:12 +00:00
|
|
|
, setuptools-scm
|
2020-08-20 17:08:02 +00:00
|
|
|
, sqlalchemy
|
|
|
|
, tqdm
|
|
|
|
, zeep
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sunpy";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "4.1.3";
|
2022-01-26 04:04:25 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-YNShjuLC7gBRn11oAd5Kp5CfCn92vAo/K4QNIXm/Mtc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
astropy-extension-helpers
|
2022-01-26 04:04:25 +00:00
|
|
|
setuptools-scm
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
astropy
|
|
|
|
astropy-helpers
|
2022-01-26 04:04:25 +00:00
|
|
|
numpy
|
2020-04-24 23:36:52 +00:00
|
|
|
parfive
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
asdf = [
|
|
|
|
asdf
|
|
|
|
# asdf-astropy
|
|
|
|
];
|
|
|
|
database = [
|
|
|
|
sqlalchemy
|
|
|
|
];
|
|
|
|
image = [
|
|
|
|
scikitimage
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
net = [
|
|
|
|
beautifulsoup4
|
|
|
|
drms
|
|
|
|
python-dateutil
|
|
|
|
tqdm
|
|
|
|
zeep
|
|
|
|
];
|
|
|
|
jpeg2000 = [
|
|
|
|
glymur
|
|
|
|
lxml
|
|
|
|
];
|
|
|
|
timeseries = [
|
|
|
|
# cdflib
|
|
|
|
h5netcdf
|
|
|
|
# h5py
|
|
|
|
matplotlib
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
hypothesis
|
|
|
|
pytest-astropy
|
|
|
|
pytest-mock
|
2022-01-26 04:04:25 +00:00
|
|
|
pytestCheckHook
|
2022-06-16 17:23:12 +00:00
|
|
|
] ++ passthru.optional-dependencies.asdf
|
|
|
|
++ passthru.optional-dependencies.database
|
|
|
|
++ passthru.optional-dependencies.image
|
|
|
|
++ passthru.optional-dependencies.net
|
|
|
|
++ passthru.optional-dependencies.timeseries;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --dist no" ""
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# darwin has write permission issues
|
|
|
|
doCheck = stdenv.isLinux;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
disabledTests = [
|
|
|
|
"rst"
|
2022-01-26 04:04:25 +00:00
|
|
|
"test_sunpy_warnings_logging"
|
|
|
|
"test_main_nonexisting_module"
|
|
|
|
"test_main_stdlib_module"
|
2022-06-16 17:23:12 +00:00
|
|
|
"test_find_dependencies"
|
2021-08-25 08:27:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
2022-06-16 17:23:12 +00:00
|
|
|
# Tests are very slow
|
|
|
|
"sunpy/net/tests/test_fido.py"
|
|
|
|
# asdf.extensions plugin issue
|
|
|
|
"sunpy/io/special/asdf/resources/schemas/"
|
|
|
|
"sunpy/io/special/asdf/resources/manifests/sunpy-1.0.0.yaml"
|
|
|
|
# Requires mpl-animators package
|
2021-12-06 16:07:01 +00:00
|
|
|
"sunpy/map/tests/test_compositemap.py"
|
|
|
|
"sunpy/map/tests/test_mapbase.py"
|
|
|
|
"sunpy/map/tests/test_mapsequence.py"
|
|
|
|
"sunpy/map/tests/test_plotting.py"
|
|
|
|
"sunpy/map/tests/test_reproject_to.py"
|
|
|
|
"sunpy/net/tests/test_helioviewer.py"
|
|
|
|
"sunpy/timeseries/tests/test_timeseriesbase.py"
|
|
|
|
"sunpy/visualization/animator/tests/test_basefuncanimator.py"
|
|
|
|
"sunpy/visualization/animator/tests/test_mapsequenceanimator.py"
|
|
|
|
"sunpy/visualization/animator/tests/test_wcs.py"
|
|
|
|
"sunpy/visualization/colormaps/tests/test_cm.py"
|
2022-06-16 17:23:12 +00:00
|
|
|
# Requires cdflib package
|
2021-12-06 16:07:01 +00:00
|
|
|
"sunpy/timeseries/tests/test_timeseries_factory.py"
|
2022-06-16 17:23:12 +00:00
|
|
|
# Requires jplephem
|
|
|
|
"sunpy/image/tests/test_transform.py"
|
|
|
|
"sunpy/io/special/asdf/tests/test_coordinate_frames.py"
|
|
|
|
"sunpy/io/special/asdf/tests/test_genericmap.py"
|
2022-01-26 04:04:25 +00:00
|
|
|
# distutils is deprecated
|
|
|
|
"sunpy/io/setup_package.py"
|
2021-08-25 08:27:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
2022-01-26 04:04:25 +00:00
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
2021-08-25 08:27:29 +00:00
|
|
|
];
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
# Wants a configuration file
|
|
|
|
# pythonImportsCheck = [
|
|
|
|
# "sunpy"
|
|
|
|
# ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2022-01-26 04:04:25 +00:00
|
|
|
description = "Python for Solar Physics";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://sunpy.org";
|
|
|
|
license = licenses.bsd2;
|
2022-01-26 04:04:25 +00:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|