diff mbox series

[bug#70995,v2,1/2] gnu: python-debugpy: Move to pyproject-build-system.

Message ID 20240518100040.13601-1-ngraves@ngraves.fr
State New
Headers show
Series [bug#70995,v2,1/2] gnu: python-debugpy: Move to pyproject-build-system. | expand

Commit Message

Nicolas Graves May 18, 2024, 10 a.m. UTC
* gnu/packages/python-xyz.scm (python-debugpy):
  [build-system]: Move to pyproject-build-system.
  [arguments]<#:test-flags>: Superset 'check phase replacement.

Change-Id: Ie112f4b25df8f7996124b465b81c84403294f2d5
---
 gnu/packages/python-xyz.scm | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index da01c71ce03..cf953674b09 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16823,10 +16823,20 @@  (define-public python-debugpy
        (sha256
         (base32
          "1dpfzs3p51648i7f3fz8dw5d0vrj39iwn1jhn0226idc02ybyqih"))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
      (list
       #:tests? #f ; Fail on systems with YAMA LSM’s ptrace scope > 0.
+      #:test-flags
+      '(list "-n" (number->string (parallel-job-count))
+             "-k" (string-append
+                   ;; These tests cannot be run in parallel because their
+                   ;; test data would not be copied by xdist and lead to
+                   ;; import errors. (see:
+                   ;; https://github.com/microsoft/debugpy/issues/342 and
+                   ;; https://github.com/microsoft/debugpy/issues/880).
+                   "not test_custom_python_args "
+                   "and not test_autokill "))
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-sh-in-tests
@@ -16844,21 +16854,7 @@  (define-public python-debugpy
             (lambda _
               ;; This adjusts the behavior of debugpy to load pydevd from
               ;; Python site packages.
-              (setenv "DEBUGPY_BUNDLING_DISABLED" "1")))
-          (replace 'check
-            (lambda* (#:key tests? #:allow-other-keys)
-              (when tests?
-                (invoke "pytest" "-vv"
-                        "-n" (number->string (parallel-job-count))
-                        "-k"
-                        (string-append
-                         ;; These tests cannot be run in parallel because their
-                         ;; test data would not be copied by xdist and lead to
-                         ;; import errors. (see:
-                         ;; https://github.com/microsoft/debugpy/issues/342 and
-                         ;; https://github.com/microsoft/debugpy/issues/880).
-                         "not test_custom_python_args "
-                         "and not test_autokill "))))))))
+              (setenv "DEBUGPY_BUNDLING_DISABLED" "1"))))))
     (native-inputs
      ;; See: https://raw.githubusercontent.com/microsoft/debugpy/
      ;;      main/tests/requirements.txt.