GNU bug report logs - #70858
[PATCH 00/32] python-team: Remove native inputs

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Fri, 10 May 2024 07:50:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 70858 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [bug#70858] [PATCH v4 35/52] build-system/pyproject: Stop hiding options.
Date: Wed, 26 Feb 2025 04:10:43 +0100
* gnu/packages/pdf.scm (python-pydyf, weasyprint)[arguments]
<#:test-flags>: Remove arguments hiding coverage options.

* gnu/packages/python-crypto.scm (python-keyring)
[arguments]<#:test-flags>: Remove arguments hiding coverage options.

* gnu/packages/python-web.scm (python-asgi-lifespan,
python-openapi-schema-validator, python-openapi-spec-validator,
python-openapi-core)[arguments]<#:test-flags>: Remove arguments hiding
coverage options.
(python-openapi-schema-validator, python-openapi-spec-validator)
[arguments]<#:phases>: Remove 'remove-coverage-pytest-options phase.
(python-cssselect2)[arguments]: Remove uneeded field.
(python-quart)[arguments]: Remove uneeded field.
(python-jsonpickle)[arguments]<#:test-flags>: Remove uneeded
test-flags.

* gnu/packages/python-xyz.scm (python-cattrs)
[arguments]<#:phases>: Remove arguments hiding coverage options.
(python-blessed)[arguments]: Remove uneeded field.

python-pytest-cov remove option
---
 gnu/packages/pdf.scm           |  6 +----
 gnu/packages/python-crypto.scm |  1 -
 gnu/packages/python-web.scm    | 42 +++-------------------------------
 gnu/packages/python-xyz.scm    |  8 +------
 4 files changed, 5 insertions(+), 52 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index ce63306c07..7308b0c661 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -805,9 +805,6 @@ (define-public python-pydyf
        (sha256
         (base32 "18q43g5d9455msipcgd5fvnh8m4a2rz189slzfg80yycjw66rshs"))))
     (build-system pyproject-build-system)
-    (arguments
-     (list
-      #:test-flags #~'("-c" "/dev/null")))
     (propagated-inputs (list python-pillow))
     (native-inputs
      (list ghostscript
@@ -1669,8 +1666,7 @@ (define-public weasyprint
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:test-flags #~(list "-c" "/dev/null"
-                           "-n" (number->string (parallel-job-count)))
+      #:test-flags #~(list "-n" (number->string (parallel-job-count)))
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-library-paths
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 674092b1cc..eb6fdd5227 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -268,7 +268,6 @@ (define-public python-keyring
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:test-flags '(list "-c" "/dev/null") ;avoid extra test dependencies
       #:phases
       #~(modify-phases %standard-phases
           (add-before 'check 'workaround-test-failure
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 4e68aa47ea..97b9263499 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -1267,8 +1267,7 @@ (define-public python-asgi-lifespan
     (arguments
      (list
       #:test-flags
-      '(list "-c" "/dev/null"           ;ignore coverage-related options
-             "-k"
+      '(list "-k"
              (string-append
               ;; XXX: Some tests fail because of "Exceptions from Trio nursery"
               "not (test_lifespan_manager[trio-None-None-StartupFailed]"
@@ -2269,10 +2268,7 @@ (define-public python-jsonpickle
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:test-flags
-      ;; Prevent running the flake8 and black pytest plugins, which only tests
-      ;; style and frequently causes harmless failures.
-      '(list "-o" "addopts=''" "tests")
+      #:test-flags '(list "tests")
       #:phases
       '(modify-phases %standard-phases
          (add-before 'check 'pre-check
@@ -3024,10 +3020,6 @@ (define-public python-openapi-schema-validator
       '(list "-k" "not test_array_prefixitems_invalid")
       #:phases
       #~(modify-phases %standard-phases
-          (add-after 'unpack 'remove-coverage-pytest-options
-            (lambda _
-              (substitute* "pyproject.toml"
-                (("^--cov.*") ""))))
           ;; See https://github.com/python-openapi/openapi-schema-validator/issues/204
           (add-after 'unpack 'relax-requirements
             (lambda _
@@ -3071,13 +3063,7 @@ (define-public python-openapi-spec-validator
      (list
       ;; These tests attempt to fetch resources from the Internet
       #:test-flags '(list "--ignore-glob=tests/integration/validation/**"
-                          "-k" "not example")
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'remove-coverage-pytest-options
-            (lambda _
-              (substitute* "pyproject.toml"
-                (("^--cov.*") "")))))))
+                          "-k" "not example")))
     (native-inputs
      (list python-poetry-core
            python-pytest))
@@ -3116,9 +3102,6 @@ (define-public python-openapi-core
      (list
       #:test-flags
       '(list "tests/unit"
-             ;; Ignore Pytest configuration in setup.cfg that adds
-             ;; unwanted flake8 and coverage options.
-             "-c" "/dev/null"
              "-k" "not test_chars_valid")))
     (native-inputs (list python-django
                          python-falcon
@@ -7114,17 +7097,6 @@ (define-public python-cssselect2
        (sha256
         (base32 "1j2fcr217rsvkipsg6zjq03rl64rxnvb5hqqpx0dv58fhspvkywk"))))
     (build-system pyproject-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'disable-linters
-           ;; Their check fails; none of our business.
-           (lambda _
-             (substitute* '("setup.py" "pyproject.toml")
-               (("'pytest-flake8',") "")
-               (("'pytest-isort',") "")
-               (("--flake8") "")
-               (("--isort") "")))))))
     (propagated-inputs
      (list python-tinycss2))
     (native-inputs
@@ -9758,14 +9730,6 @@ (define-public python-quart
        (sha256
         (base32 "1h5ifv8g9dc9m07vj4v7dfalam83v38545d845vvgys1gan1pscd"))))
     (build-system pyproject-build-system)
-    (arguments
-     (list
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'remove-coverage-pytest-options
-            (lambda _
-              (substitute* "pyproject.toml"
-                (("--no-cov-on-fail") "")))))))
     (native-inputs
      (list python-poetry-core
            python-pytest
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b42c954233..b2cad47edf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22866,9 +22866,7 @@ (define-public python-cattrs
               (substitute* "pyproject.toml"
                 ;; Fix version string
                 (("dynamic = \\[\"version\"\\]")
-                 (string-append "version = \"" #$version "\""))
-                ;; Just run pytest with no frills
-                (("addopts = \"-l.*") ""))))
+                 (string-append "version = \"" #$version "\"")))))
           ;; XXX Our python-hypothesis package is too old.
           (add-after 'unpack 'compatibility
             (lambda _
@@ -33914,10 +33912,6 @@ (define-public python-blessed
          ;; Don't get hung up on Windows test failures.
          '(delete-file "blessed/win_terminal.py"))))
     (build-system pyproject-build-system)
-    (arguments
-     (list
-      ;; Avoid python-pytest-coverage
-      #:test-flags '(list "-c /dev/null")))
     (propagated-inputs (list python-six python-wcwidth))
     (native-inputs (list python-pytest python-setuptools python-wheel))
     (home-page "https://github.com/jquast/blessed")
-- 
2.48.1





This bug report was last modified 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.