2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
asdf,
|
|
|
|
astropy,
|
|
|
|
astropy-extension-helpers,
|
|
|
|
astropy-helpers,
|
|
|
|
beautifulsoup4,
|
|
|
|
buildPythonPackage,
|
|
|
|
drms,
|
|
|
|
fetchPypi,
|
|
|
|
glymur,
|
|
|
|
h5netcdf,
|
|
|
|
hypothesis,
|
|
|
|
lxml,
|
|
|
|
matplotlib,
|
|
|
|
numpy,
|
|
|
|
pandas,
|
|
|
|
parfive,
|
|
|
|
pytest-astropy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-mock,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
|
|
|
scikit-image,
|
|
|
|
scipy,
|
|
|
|
setuptools-scm,
|
|
|
|
sqlalchemy,
|
|
|
|
tqdm,
|
|
|
|
zeep,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sunpy";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "5.1.2";
|
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;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-1/oz2Ir1K7nR6B2TPZzSjbyiADyQyRlzE9KqTg7EwkA=";
|
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
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
database = [ sqlalchemy ];
|
2022-06-16 17:23:12 +00:00
|
|
|
image = [
|
2023-05-24 13:37:59 +00:00
|
|
|
scikit-image
|
2022-06-16 17:23:12 +00:00
|
|
|
scipy
|
|
|
|
];
|
|
|
|
net = [
|
|
|
|
beautifulsoup4
|
|
|
|
drms
|
|
|
|
python-dateutil
|
|
|
|
tqdm
|
|
|
|
zeep
|
|
|
|
];
|
|
|
|
jpeg2000 = [
|
|
|
|
glymur
|
|
|
|
lxml
|
|
|
|
];
|
|
|
|
timeseries = [
|
|
|
|
# cdflib
|
|
|
|
h5netcdf
|
|
|
|
# h5py
|
|
|
|
matplotlib
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs =
|
|
|
|
[
|
|
|
|
hypothesis
|
|
|
|
pytest-astropy
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
]
|
|
|
|
++ passthru.optional-dependencies.asdf
|
2022-06-16 17:23:12 +00:00
|
|
|
++ 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;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2023-03-27 19:17:25 +00:00
|
|
|
broken = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|