summary refs log tree commit diff
path: root/gnu/packages/check.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r--gnu/packages/check.scm348
1 files changed, 144 insertions, 204 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 4e907afeb6..aa7435bcb4 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2015, 2017 Cyril Roelandt <tipecaml@gmail.com>
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015, 2016, 2018-2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2018-2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
@@ -35,7 +35,7 @@
 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2022 David Elsing <david.elsing@posteo.net>
@@ -100,6 +100,7 @@
   #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
+  #:use-module (guix deprecation)
   #:use-module (srfi srfi-1))
 
 (define-public pict
@@ -721,7 +722,7 @@ format.")
 (define-public cppcheck
   (package
     (name "cppcheck")
-    (version "2.3")
+    (version "2.10")
     (source (origin
       (method git-fetch)
       (uri (git-reference
@@ -729,7 +730,7 @@ format.")
              (commit version)))
       (file-name (git-file-name name version))
       (sha256
-       (base32 "03ic5mig3ryzkf85r95ryagf84s7y5nd6sqr915l3zj30apnifvz"))))
+       (base32 "0riq7jlv21v2p77r01i36ll3klbgnkpsfk1wx4q8p1v5h5zgkkaa"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags '("-DBUILD_TESTS=ON")))
@@ -943,7 +944,7 @@ test coverage and has a web user interface that will refresh automatically.")
 (define-public googletest
   (package
     (name "googletest")
-    (version "1.11.0")
+    (version "1.12.1")
     (source
      (origin
        (method git-fetch)
@@ -952,7 +953,7 @@ test coverage and has a web user interface that will refresh automatically.")
              (commit (string-append "release-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0pd4y1gpx1z8fiyarkvqlmk6hbv0lc8fr00ivnsvqzi1xg34jfaa"))))
+        (base32 "1cv55x3amwrvfan9pr8dfnicwr8r6ar3yf6cg9v6nykd6m2v3qsv"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
@@ -1102,13 +1103,13 @@ syntax validation, ...
 (define-public python-parameterized
   (package
     (name "python-parameterized")
-    (version "0.7.4")
+    (version "0.8.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "parameterized" version))
        (sha256
-        (base32 "1444fdz5bj0k10nmhxv0bv2gfrfisi7hfzqdndb0pvhf4g3qq3qr"))))
+        (base32 "0p1vhfw552rgd7gb2vy4l4l4k8mnbdz7f3chgzvk0r0qsqvzzfs1"))))
     (build-system python-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
@@ -1263,57 +1264,54 @@ standard library.")
 (define-public python-pytest
   (package
     (name "python-pytest")
-    (version "6.2.5")
+    (version "7.1.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest" version))
        (sha256
         (base32
-         "12cyi0lnyaq8sdqfnqlppd76gkw6zcg10gyih5knx9v611l3c6qk"))))
+         "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'pretend-version
-           ;; The version string is usually derived via setuptools-scm, but
-           ;; without the git metadata available, the version string is set to
-           ;; '0.0.0'.
-           (lambda _
-             (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)))
-         (replace 'check
-           (lambda* (#:key (tests? #t) #:allow-other-keys)
-             (setenv "TERM" "dumb")     ;attempt disabling markup tests
-             (if tests?
-                 (invoke "pytest" "-vv" "-k"
-                         (string-append
-                          ;; This test involves the /usr directory, and fails.
-                          " not test_argcomplete"
-                          ;; These test do not honor the isatty detection and
-                          ;; fail.
-                          " and not test_code_highlight"
-                          " and not test_color_yes"))
-                 (format #t "test suite not run~%")))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'pretend-version
+            ;; The version string is usually derived via setuptools-scm, but
+            ;; without the git metadata available, the version string is set to
+            ;; '0.0.0'.
+            (lambda _
+              (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
+                      #$(package-version this-package))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (setenv "TERM" "dumb")    ;attempt disabling markup tests
+              (if tests?
+                  (invoke "pytest" "-vv" "-k"
+                          (string-append
+                           ;; This test involves the /usr directory, and fails.
+                           " not test_argcomplete"
+                           ;; These test do not honor the isatty detection and
+                           ;; fail.
+                           " and not test_code_highlight"
+                           " and not test_color_yes"))
+                  (format #t "test suite not run~%")))))))
     (propagated-inputs
-     `(("python-attrs" ,python-attrs-bootstrap)
-       ("python-iniconfig" ,python-iniconfig)
-       ("python-more-itertools" ,python-more-itertools)
-       ("python-packaging" ,python-packaging-bootstrap)
-       ("python-pluggy" ,python-pluggy)
-       ("python-py" ,python-py)
-       ("python-six" ,python-six-bootstrap)
-       ("python-toml" ,python-toml)
-       ("python-wcwidth" ,python-wcwidth)))
+     (list python-attrs-bootstrap
+           python-iniconfig
+           python-packaging-bootstrap
+           python-pluggy
+           python-py
+           python-tomli))
     (native-inputs
-     `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
-       ("bash" ,bash)
-       ("python-hypothesis" ,python-hypothesis)
-       ("python-nose" ,python-nose)
-       ("python-mock" ,python-mock)
-       ("python-pytest" ,python-pytest-bootstrap)
-       ("python-setuptools-scm" ,python-setuptools-scm)
-       ("python-toml" ,python-toml)
-       ("python-xmlschema" ,python-xmlschema)))
+     ;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
+     (list bash
+           python-hypothesis
+           python-nose
+           python-pytest-bootstrap
+           python-setuptools-scm
+           python-xmlschema))
     (home-page "https://docs.pytest.org/en/latest/")
     (synopsis "Python testing library")
     (description
@@ -1322,7 +1320,8 @@ and functions, detailed info on failing assert statements, modular fixtures,
 and many external plugins.")
     (license license:expat)))
 
-(define-public python-pytest-6 python-pytest)
+(define-deprecated python-pytest-6 python-pytest)
+(export python-pytest-6)
 
 ;; Astropy started using hard dependencies for Pytest 7+, which might
 ;; happen for some other projects. It could be set as default in staging.
@@ -1351,7 +1350,7 @@ and many external plugins.")
     (inherit python-pytest)
     (name "python-pytest-bootstrap")
     (native-inputs (list python-iniconfig python-setuptools-scm
-                         python-toml))
+                         python-tomli))
     (arguments `(#:tests? #f))))
 
 (define-public python-pytest-assume
@@ -1541,28 +1540,39 @@ Python's @code{random.seed}.")
 (define-public python-pytest-runner
   (package
     (name "python-pytest-runner")
-    (version "5.2")
+    (version "6.0.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-runner" version))
        (sha256
         (base32
-         "0awll1bva5zy8cspsxcpv7pjcrdf5c6pf56nqn4f74vvmlzfgiwn"))))
+         "11dnhxnjmh4nf1j8rnvx944ha3wg8ggrgrwdcx4c7d19xmi57n5l"))))
     (build-system python-build-system)
     (arguments
-     '(;; FIXME: The test suite requires 'python-flake8' and 'python-black',
-       ;; but that introduces a circular dependency.
-       #:tests? #f
-       #:phases (modify-phases %standard-phases
-                  (replace 'check
-                    (lambda* (#:key tests? #:allow-other-keys)
-                      (if tests?
-                          (invoke "pytest" "-vv")
-                          (format #t "test suite not run~%"))
-                      #t)))))
+     (list
+      ;; FIXME: The test suite requires 'python-flake8' and 'python-black',
+      ;; but that introduces a circular dependency.
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'build
+            (lambda _
+              (let ((circa-1980 (* 10 366 24 60 60)))
+                (setenv "SOURCE_DATE_EPOCH" (number->string circa-1980))
+                (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))))
+          (replace 'install
+            (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~%")))))))
     (native-inputs
-     (list python-setuptools-scm))
+     (list python-pypa-build python-setuptools-scm python-wheel))
     (home-page "https://github.com/pytest-dev/pytest-runner")
     (synopsis "Invoke py.test as a distutils command")
     (description
@@ -1600,13 +1610,13 @@ Python's @code{random.seed}.")
 (define-public python-pytest-mock
   (package
     (name "python-pytest-mock")
-    (version "3.6.1")
+    (version "3.8.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-mock" version))
        (sha256
-        (base32 "0qhfmd05z3g88bnwq6644jl6p5wy01i4yy7h8883z9jjih2pl8a0"))
+        (base32 "18pwr0qhr2z5rpfz7930986s55hh1gnmmq4m09q5h99rai2kzw3p"))
        (modules '((guix build utils)))
        (snippet
         ;; Some tests do a string match on Pytest output, and fails when
@@ -1646,44 +1656,26 @@ same arguments.")
 (define-public python-pytest-xdist
   (package
     (name "python-pytest-xdist")
-    (version "2.1.0")
+    (version "2.5.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-xdist" version))
        (sha256
         (base32
-         "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2"))
-       (modules '((guix build utils)))
-       (snippet
-        '(begin
-           ;; Remove pre-compiled .pyc files from source.
-           (for-each delete-file-recursively
-                     (find-files "." "__pycache__" #:directories? #t))
-           (for-each delete-file (find-files "." "\\.pyc$"))
-           #t))))
+         "1psf5dqxvc38qzxvc305mkg5xpdmdkbkkfiyqlmdnkgh7z5dx025"))))
     (build-system python-build-system)
     (arguments
-     '(#:tests? #f ; Lots of tests fail.
-       #:phases
+     '(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-setup-py
-           (lambda _
-             ;; Relax pytest requirement.
-             (substitute* "setup.py"
-               (("pytest>=6\\.0\\.0") "pytest"))))
          (replace 'check
-           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+           (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (add-installed-pythonpath inputs outputs)
                (invoke "pytest" "-vv"
                        "-n" (number->string (parallel-job-count)))))))))
-    (native-inputs
-     (list python-setuptools-scm))
-    (propagated-inputs
-     (list python-execnet python-pytest python-py python-pytest-forked))
-    (home-page
-     "https://github.com/pytest-dev/pytest-xdist")
+    (native-inputs (list python-setuptools-scm python-filelock python-pytest))
+    (propagated-inputs (list python-execnet python-pytest-forked))
+    (home-page "https://github.com/pytest-dev/pytest-xdist")
     (synopsis
      "Plugin for py.test with distributed testing and loop-on-failing modes")
     (description
@@ -1695,31 +1687,17 @@ program code to a remote location, executes there, and then syncs the
 result back.")
     (license license:expat)))
 
-(define-public python-pytest-xdist-next
-  (package/inherit python-pytest-xdist
-    (name "python-pytest-xdist")
-    (version "2.5.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "pytest-xdist" version))
-       (sha256
-        (base32
-         "1psf5dqxvc38qzxvc305mkg5xpdmdkbkkfiyqlmdnkgh7z5dx025"))))
-    (propagated-inputs (list python-execnet python-pytest
-                             python-pytest-forked-next))))
-
 (define-public python-pytest-timeout
   (package
     (name "python-pytest-timeout")
-    (version "2.0.2")
+    (version "2.1.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-timeout" version))
        (sha256
         (base32
-         "04l1cd2qyp3fbccw95a8nqg682r647v7yil8807dgs7xv9a8pyg6"))))
+         "1nf339zg6qam3681f72j9c8fbqk8qcilna92psmzh4n60isa0z60"))))
     (build-system python-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
@@ -1742,7 +1720,7 @@ timeout has been exceeded.")
 (define-public python-pytest-forked
   (package
     (name "python-pytest-forked")
-    (version "1.3.0")
+    (version "1.4.0")
     (source
      (origin
        (method git-fetch)               ;for tests
@@ -1752,29 +1730,24 @@ timeout has been exceeded.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1aip4kx50ynvykl7kq2mlbsi82vx701dvb8mm64lhp69bbv105rc"))))
+         "0j9bbjny7h3b4fig6l26f26c697r67mm62fzdd9m9rqyy2bmnqjs"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'disable-setuptools-scm
+         (add-before 'build 'pretend-version
            (lambda _
-             (substitute* "setup.py"
-               (("use_scm_version=True")
-                (format #f "version=~s" ,version))
-               (("setup_requires=\\['setuptools_scm'\\],.*")
-                ""))))
+             (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)))
          (replace 'check
-           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+           (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (add-installed-pythonpath inputs outputs)
                (invoke "pytest" "-vv")))))))
     (native-inputs
      ;; XXX: The bootstrap variant of Pytest is used to ensure the
      ;; 'hypothesis' plugin is not in the environment (due to
      ;; <http://issues.guix.gnu.org/25235>), which would cause the test suite
      ;; to fail (see: https://github.com/pytest-dev/pytest-forked/issues/54).
-     `(("python-pytest" ,python-pytest-bootstrap)))
+     (list python-pytest-bootstrap python-setuptools-scm))
     (home-page "https://github.com/pytest-dev/pytest-forked")
     (synopsis "Pytest plugin to run tests in isolated forked subprocesses")
     (description "This package provides a Pytest plugin which enables running
@@ -1783,23 +1756,6 @@ can be useful to isolate tests against undesirable global environment
 side-effects (such as setting environment variables).")
     (license license:expat)))
 
-(define-public python-pytest-forked-next
-  (package
-    (inherit python-pytest-forked)
-    (name "python-pytest-forked")
-    (version "1.4.0")
-    (source
-     (origin
-       (method git-fetch)               ;for tests
-       (uri (git-reference
-             (url "https://github.com/pytest-dev/pytest-forked")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "0j9bbjny7h3b4fig6l26f26c697r67mm62fzdd9m9rqyy2bmnqjs"))))
-    (native-inputs (list python-pytest-bootstrap python-setuptools-scm))))
-
 (define-public python-scripttest
   (package
     (name "python-scripttest")
@@ -2072,18 +2028,20 @@ have failed since the last commit or what tests are currently failing.")))
 (define-public python-coverage
   (package
     (name "python-coverage")
-    (version "5.2.1")
+    (version "6.4.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "coverage" version))
        (sha256
         (base32
-         "16z8i18msgs8k74n73dj9x49wzkl0vk4vq8k5pl1bsj70y7b4k53"))))
+         "157vndwrzyv9ypn2w3b6g8gv7vw07v994hq8nxasdb75k3ry2apc"))))
     (build-system python-build-system)
     (arguments
      ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
      '(#:tests? #f))
+    (propagated-inputs
+     (list python-tomli))
     (home-page "https://coverage.readthedocs.io")
     (synopsis "Code coverage measurement for Python")
     (description
@@ -2355,20 +2313,24 @@ instantly.")
 (define-public python-hypothesis
   (package
     (name "python-hypothesis")
-    (version "6.0.2")
+    (version "6.54.5")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "hypothesis" version))
               (sha256
                (base32
-                "0wj7ip779naf2n076nylf2gi0sjz68z1ir9d9r2rgs7br18naqdf"))))
+                "1ivyrjpnahvj359pfndnk8x3h0gw37kqm02fmnzibx4mas15d44a"))))
     (build-system python-build-system)
     (arguments
      ;; XXX: Tests are not distributed with the PyPI archive.
-     '(#:tests? #f))
+     (list #:tests? #f
+           #:phases
+           #~(modify-phases %standard-phases
+               ;; XXX: hypothesis requires pytest at runtime, but we can
+               ;; not propagate it due to a circular dependency.
+               (delete 'sanity-check))))
     (propagated-inputs
-     `(("python-attrs" ,python-attrs-bootstrap)
-       ("python-sortedcontainers" ,python-sortedcontainers)))
+     (list python-attrs-bootstrap python-exceptiongroup python-sortedcontainers))
     (synopsis "Library for property based testing")
     (description "Hypothesis is a library for testing your Python code against a
 much larger range of examples than you would ever want to write by hand.  It’s
@@ -2377,20 +2339,8 @@ seamlessly into your existing Python unit testing work flow.")
     (home-page "https://hypothesis.works/")
     (license license:mpl2.0)))
 
-;;; TODO: Make the default python-hypothesis in the next rebuild cycle.
-(define-public python-hypothesis-next
-  (package
-    (inherit python-hypothesis)
-    (version "6.43.3")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "hypothesis" version))
-              (sha256
-               (base32
-                "0d67dlc5a47i48fxzmji2mnybzby0h1wdscmj54555fghcyp1045"))))
-    (propagated-inputs
-     (modify-inputs (package-propagated-inputs python-hypothesis)
-       (append python-pytest)))))       ;to satisfy the sanity-check phase
+(define-deprecated python-hypothesis-next python-hypothesis)
+(export python-hypothesis-next)
 
 (define-public python-hypothesmith
   (package
@@ -2703,7 +2653,7 @@ statements in the module it tests.")
 (define-public python-pylint
   (package
     (name "python-pylint")
-    (version "2.12.2")
+    (version "2.14.5")
     (source
      (origin
        (method git-fetch)
@@ -2712,7 +2662,7 @@ statements in the module it tests.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0spmy7j1vvh55shzgma80q61y0d1cj45dcgslb4g5w3y602miq5i"))))
+        (base32 "0ljfvyzr2i07pi7m19kbshlc3cfnwr53mjhcpydaa0w8bak4cc95"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -2731,10 +2681,11 @@ statements in the module it tests.")
      (list python-pytest python-pytest-xdist))
     (propagated-inputs
      (list python-astroid
+           python-dill
            python-isort
            python-mccabe
            python-platformdirs
-           python-toml
+           python-tomlkit
            python-typing-extensions))
     (home-page "https://github.com/PyCQA/pylint")
     (synopsis "Advanced Python code static checker")
@@ -3206,7 +3157,7 @@ portable to just about any platform.")
 (define-public libfaketime
   (package
     (name "libfaketime")
-    (version "0.9.9")
+    (version "0.9.10")
     (home-page "https://github.com/wolfcw/libfaketime")
     (source (origin
               (method git-fetch)
@@ -3215,42 +3166,40 @@ portable to just about any platform.")
                     (commit (string-append "v" version))))
               (sha256
                (base32
-                "1gi1xciqga5hl2xlk7rc3j8wy47ag97pi7ngmdl6ny1d11b2wn1z"))
+                "112l7x2gv4f47hpffpb8djfwvgrs8w5h9s266h1fshi1c916x10d"))
               (file-name (git-file-name name version))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'embed-date-reference
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (let ((coreutils (assoc-ref inputs "coreutils")))
-                        (substitute* "src/faketime.c"
-                          (("\"date\"")
-                           (string-append "\"" coreutils "/bin/date\""))))))
-                  (replace 'configure
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let ((out (assoc-ref outputs "out")))
-                        (setenv "CC" ,(cc-for-target))
-                        (setenv "PREFIX" out)
-
-                        ;; XXX: Without this flag, the CLOCK_REALTIME test hangs
-                        ;; indefinitely.  See README.packagers for more information.
-                        ;; There are specific instructions to not enable more flags
-                        ;; than absolutely needed.
-                        ,(if (or (target-ppc64le?)
-                                 (target-riscv64?))
-                           `(setenv "FAKETIME_COMPILE_CFLAGS"
-                                    "-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER")
-                           `(setenv "FAKETIME_COMPILE_CFLAGS"
-                                    "-DFORCE_MONOTONIC_FIX")))))
-                  (add-before 'check 'pre-check
-                    (lambda _
-                      (substitute* "test/functests/test_exclude_mono.sh"
-                        (("/bin/bash") (which "bash"))))))
-       #:test-target "test"))
-    (native-inputs
-     (list perl))                           ;for tests
-    (inputs
-     (list coreutils))
+     (list
+      #:test-target "test"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'embed-date-reference
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "src/faketime.c"
+                (("\"date\"")
+                 (format #f "~s" (search-input-file inputs "bin/date"))))))
+          (replace 'configure
+            (lambda* (#:key outputs #:allow-other-keys)
+              (setenv "CC" #$(cc-for-target))
+              (setenv "PREFIX" #$output)
+
+              ;; XXX: Without this flag, the CLOCK_REALTIME test hangs
+              ;; indefinitely.  See README.packagers for more information.
+              ;; There are specific instructions to not enable more flags
+              ;; than absolutely needed.
+              #$@(if (or (target-ppc64le?)
+                         (target-riscv64?))
+                     #~((setenv "FAKETIME_COMPILE_CFLAGS"
+                                "-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER"))
+                     #~((setenv "FAKETIME_COMPILE_CFLAGS"
+                                "-DFORCE_MONOTONIC_FIX")))))
+          (add-before 'check 'pre-check
+            (lambda _
+              (substitute* "test/functests/test_exclude_mono.sh"
+                (("/bin/bash") (which "bash"))))))))
+    (native-inputs (list perl))         ;for tests
+    (inputs (list coreutils-minimal))
     (synopsis "Fake the system time for single applications")
     (description
      "The libfaketime library allows users to modify the system time that an
@@ -3354,7 +3303,7 @@ grew out of the @dfn{Vc} project.")
 (define-public python-pyfakefs
   (package
     (name "python-pyfakefs")
-    (version "3.7.1")
+    (version "4.6.3")
     (source (origin
               (method url-fetch)
               ;; We use the PyPI URL because there is no proper release
@@ -3363,22 +3312,13 @@ grew out of the @dfn{Vc} project.")
               (uri (pypi-uri "pyfakefs" version))
               (sha256
                (base32
-                "1cp2yw96fa2qkgi39xa3nlr3inf8wb5rgh9kdq53256ca2r8pdhy"))
+                "18bcv8yalg80zgigx40fk692yr3wf9ch1hkb0cdplqspyry2mwbd"))
               (patches (search-patches
                         "python-pyfakefs-remove-bad-test.patch"))
               (file-name (string-append name "-" version ".tar.gz"))))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-testsuite
-           (lambda _
-             ;; Time difference is larger than expected.
-             (substitute* "pyfakefs/tests/fake_filesystem_unittest_test.py"
-               (("(\\s+)def test_copy_real_file" all indent)
-                (string-append
-                  indent
-                  "@unittest.skip('disabled by guix')\n"
-                  all)))))
          ;; The default test suite does not run these extra tests.
          (add-after 'check 'check-pytest-plugin
            (lambda _