Subject: [bug#70855] [PATCH 33/92] gnu: python-pytest-runner: Improve package style.

From: Nicolas Graves <[email-masked]>
Date: Fri, 10 May 2024 00:53:28 +0200

* gnu/packages/check.scm (python-pytest-runner):
  [build-system]: Move to pyproject-build-system.
  [arguments]<#:phases>: Remove check phase replacement. Update
  <#:tests?> refusal comment.
  [native-inputs]: Add python-pip, python-pypa-build,
  python-setuptools and python-wheel.

Change-Id: Id36e7ed4a3cec6098f0877f48f3fbcbd8007f3c3
---
 gnu/packages/check.scm | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 15d2910603b..5708fa91acd 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1640,10 +1640,10 @@ (define-public python-pytest-runner
        (sha256
         (base32
          "11dnhxnjmh4nf1j8rnvx944ha3wg8ggrgrwdcx4c7d19xmi57n5l"))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
      (list
-      ;; FIXME: The test suite requires 'python-flake8' and 'python-black',
+      ;; FIXME: The test suite requires 'python-pytest-virtualenv',
       ;; but that introduces a circular dependency.
       #:tests? #f
       #:phases
@@ -1657,14 +1657,10 @@ (define-public python-pytest-runner
             (lambda _
               (let ((whl (car (find-files "dist" "\\.whl$"))))
                 (invoke "pip" "--no-cache-dir" "--no-input"
-                        "install" "--no-deps" "--prefix" #$output whl))))
-          (replace 'check
-            (lambda* (#:key tests? #:allow-other-keys)
-              (if tests?
-                  (invoke "pytest" "-vv")
-                  (format #t "test suite not run~%")))))))
+                        "install" "--no-deps" "--prefix" #$output whl)))))))
     (native-inputs
-     (list python-pypa-build python-setuptools-scm python-wheel))
+     (list python-pip python-pypa-build python-pytest
+           python-setuptools python-setuptools-scm python-wheel))
     (home-page "https://github.com/pytest-dev/pytest-runner")
     (synopsis "Invoke py.test as a distutils command")
     (description
-- 
2.41.0