about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/sunpy
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-12-06 19:57:55 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-08 13:48:30 +0000
commitbf3aadfdd39aa197e18bade671fab6726349ffa4 (patch)
tree698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/python-modules/sunpy
parentf4afc5a01d9539ce09e47494e679c51f80723d07 (diff)
parent99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff)
downloadnixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/sunpy')
-rw-r--r--nixpkgs/pkgs/development/python-modules/sunpy/default.nix99
1 files changed, 64 insertions, 35 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/sunpy/default.nix b/nixpkgs/pkgs/development/python-modules/sunpy/default.nix
index 4e61f8665ba6..aad3afda8adf 100644
--- a/nixpkgs/pkgs/development/python-modules/sunpy/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/sunpy/default.nix
@@ -1,44 +1,44 @@
 { lib
 , stdenv
-, buildPythonPackage
-, fetchPypi
-, pythonOlder
 , asdf
 , astropy
-, setuptools-scm
-, astropy-helpers
 , astropy-extension-helpers
+, astropy-helpers
 , beautifulsoup4
+, buildPythonPackage
 , drms
+, fetchPypi
 , glymur
 , h5netcdf
 , hypothesis
+, lxml
 , matplotlib
 , numpy
 , pandas
 , parfive
-, pytestCheckHook
 , pytest-astropy
+, pytestCheckHook
 , pytest-mock
 , python-dateutil
+, pythonOlder
 , scikitimage
 , scipy
+, setuptools-scm
 , sqlalchemy
-, towncrier
 , tqdm
 , zeep
 }:
 
 buildPythonPackage rec {
   pname = "sunpy";
-  version = "3.1.3";
+  version = "4.0.4";
   format = "setuptools";
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.8";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "4acb05a05c7e6a2090cd0bb426b34c7e1620be0de2bf90a95a3f48ba15a5fce2";
+    hash = "sha256-O4VjxcuJVgUjjz3VWyczCjJxvJvAL94MBnGsRn54Ld4=";
   };
 
   nativeBuildInputs = [
@@ -47,32 +47,59 @@ buildPythonPackage rec {
   ];
 
   propagatedBuildInputs = [
-    asdf
     astropy
     astropy-helpers
-    beautifulsoup4
-    drms
-    glymur
-    h5netcdf
-    matplotlib
     numpy
-    pandas
     parfive
-    python-dateutil
-    scikitimage
-    scipy
-    sqlalchemy
-    towncrier
-    tqdm
-    zeep
   ];
 
+  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
+    ];
+  };
+
   checkInputs = [
     hypothesis
     pytest-astropy
     pytest-mock
     pytestCheckHook
-  ];
+  ] ++ 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" ""
+  '';
 
   # darwin has write permission issues
   doCheck = stdenv.isLinux;
@@ -86,18 +113,16 @@ buildPythonPackage rec {
     "test_sunpy_warnings_logging"
     "test_main_nonexisting_module"
     "test_main_stdlib_module"
+    "test_find_dependencies"
   ];
 
   disabledTestPaths = [
-    "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/helioprojective-1.0.0.yaml"
-    "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/heliocentric-1.0.0.yaml"
-    "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/heliographic_carrington-*.yaml"
-    "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/geocentricearthequatorial-1.0.0.yaml"
-    "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/geocentricsolarecliptic-1.0.0.yaml"
-    "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/heliocentricearthecliptic-1.0.0.yaml"
-    "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/heliocentricinertial-1.0.0.yaml"
-    "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/map/generic_map-1.0.0.yaml"
-    # requires mpl-animators package
+    # 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
     "sunpy/map/tests/test_compositemap.py"
     "sunpy/map/tests/test_mapbase.py"
     "sunpy/map/tests/test_mapsequence.py"
@@ -109,8 +134,12 @@ buildPythonPackage rec {
     "sunpy/visualization/animator/tests/test_mapsequenceanimator.py"
     "sunpy/visualization/animator/tests/test_wcs.py"
     "sunpy/visualization/colormaps/tests/test_cm.py"
-    # requires cdflib package
+    # Requires cdflib package
     "sunpy/timeseries/tests/test_timeseries_factory.py"
+    # 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"
     # distutils is deprecated
     "sunpy/io/setup_package.py"
   ];