summary refs log tree commit diff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-05-11 14:14:42 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-05-11 15:59:22 +0200
commitab91da500421cbece3e2b89234f0057bba6725a0 (patch)
tree4ab873ee4776aa9425b5fe39c7aa12e49046dd39 /gnu/packages/python-xyz.scm
parente1c3adb27d0a92607b5341f7b4352e6b1e89e685 (diff)
downloadguix-ab91da500421cbece3e2b89234f0057bba6725a0.tar.gz
gnu: python-dask: Update to 2023.4.1.
* gnu/packages/python-xyz.scm (python-dask): Update to 2023.4.1.
[source]: Remove snippet.
[build-system]: Use pyproject-build-system.
[arguments]: Remove custom 'check phase; update 'versioneer phase; add
'fix-pytest-config and 'pre-check phases; set #:test-flags.
[native-inputs]: Add python-click and python-importlib-metadata.
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm66
1 files changed, 50 insertions, 16 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index dd6fdf92a1..491e7e37e8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24832,29 +24832,61 @@ decisions with any given backend.")
 (define-public python-dask
   (package
     (name "python-dask")
-    (version "2022.05.2")
+    (version "2023.4.1")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url "https://github.com/dask/dask/")
-             (commit "8db1597c9745543df3129399bead5fbc95a54571")))
+             (commit "a69a808f75a961504a9ba18058bff5e458be97fb")))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1xfk3wml972z502w5ii5mn03ls3rg5p4hqgl0hkicgpmzlyz9kph"))
-       (snippet
-        ;; Delete generated copy of python-versioneer.  We recreate it below.
-        '(delete-file "versioneer.py"))))
-    (build-system python-build-system)
+        (base32 "089kz6hcgl4yxwx99br1124sg1gkdy554hf120z9a5cfbrf0ah9y"))))
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'versioneer
-           (lambda _
-             (invoke "versioneer" "install")))
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests? (invoke "pytest" "-vv")))))))
+     (list
+      ;; Avoid coverage
+      #:test-flags
+      #~(list "-m" "not gpu and not slow and not network"
+              "-k" (string-append
+                    ;; This one cannot be interrupted.
+                    "not test_interrupt"
+                    ;; This one expects a deprecation warning that never
+                    ;; comes.
+                    " and not test_RandomState_only_funcs")
+              ;; Tests must run from the output directory, because otherwise
+              ;; it complains about the difference between the target
+              ;; directory embedded in the pyc files and the source directory
+              ;; from which we run tests.
+              (getcwd))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'versioneer
+            (lambda _
+              ;; Our version of versioneer needs setup.cfg.  This is adapted
+              ;; from pyproject.toml.
+              (with-output-to-file "setup.cfg"
+                (lambda ()
+                  (display "\
+[versioneer]
+VCS = git
+style = pep440
+versionfile_source = dask/_version.py
+versionfile_build = dask/_version.py
+tag_prefix =
+parentdir_prefix = dask-
+")))
+              (invoke "versioneer" "install")
+              (substitute* "setup.py"
+                (("versioneer.get_version\\(\\)")
+                 (string-append "\"" #$version "\"")))))
+          (add-after 'unpack 'fix-pytest-config
+            (lambda _
+              ;; This option is not supported by our version of pytest.
+              (substitute* "pyproject.toml"
+                (("--cov-config=pyproject.toml") ""))))
+          (add-before 'check 'pre-check
+            (lambda _ (chdir "/tmp"))))))
     (propagated-inputs
      (list python-cloudpickle
            python-fsspec
@@ -24865,7 +24897,9 @@ decisions with any given backend.")
            python-toolz
            python-pyyaml))
     (native-inputs
-     (list python-pytest python-pytest-runner python-pytest-rerunfailures
+     (list python-click
+           python-importlib-metadata
+           python-pytest python-pytest-runner python-pytest-rerunfailures
            python-versioneer))
     (home-page "https://github.com/dask/dask/")
     (synopsis "Parallel computing with task scheduling")