[bug#76712,7/7] gnu: python-scooby: Update to 0.10.0.

Message ID 46b9ebe0a3d12946531d376fcfafce11df5c9ad4.1741010255.git.monego@posteo.net
State New
Headers
Series Refactor and update libvips-related packages |

Commit Message

Vinicius Monego March 3, 2025, 2:02 p.m. UTC
  * gnu/packages/python-xyz.scm (python-scooby): Update to 0.10.0.
[build-system]: Use pyproject-build-system.
[native-inputs]: Add python-no-version, python-pytest-console-scripts,
python-setuptools, python-wheel, python-time.
[arguments]: Move below build-system. Remove 'fix-tests and custom
'check phase. Skip a failing test.
* gnu/packages/python-xyz.scm (python-no-version): New variable.

Change-Id: Idbab8d0eaedd5f0fcbaa71de052de7c5c74c0da1
---
 gnu/packages/python-xyz.scm | 54 +++++++++++++++++++++++--------------
 1 file changed, 34 insertions(+), 20 deletions(-)
  

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7a3dcc0c76..4b3468348a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -39080,7 +39080,7 @@  (define python-pyvips-for-python-scooby
 (define-public python-scooby
   (package
     (name "python-scooby")
-    (version "0.5.12")
+    (version "0.10.0")
     (source
      ;; The PyPI tarball does not contain the tests.
      (origin
@@ -39090,33 +39090,27 @@  (define-public python-scooby
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1gkpmz8wl3jg8ylf1na35308sznw2g9wx33zqlyq5i2gpy2ml9mw"))))
-    (build-system python-build-system)
+        (base32 "10d9j9anhgfhqg7rs34pld7ivyja2plz7z4bzdjsvkwgq8vlny19"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      ;; FIXME: This test uses pytest-console-scripts in subprocess mode to
+      ;; call the 'scooby' executable.  Check why this failed.
+      #:test-flags #~(list "-k" "not test_cli")))
     (native-inputs
      (list python-beautifulsoup4
+           python-no-version
            python-numpy
            python-pytest
+           python-pytest-console-scripts
            python-pytest-cov
            python-pyvips-for-python-scooby
-           python-scipy))
+           python-scipy
+           python-setuptools
+           python-wheel
+           time))
     (propagated-inputs
      (list python-psutil))
-    (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-tests
-           (lambda _
-             (substitute* "tests/test_scooby.py"
-               ;; The test suite uses the no-version PyPI package
-               ;; (https://pypi.org/project/no-version/),
-               ;; but it doesn't seem worth packaging in Guix just for this.
-               (("scooby\\.report\\.VERSION_NOT_FOUND")
-                "scooby.report.MODULE_NOT_FOUND")
-               (("^ +import no_version  # noqa.*") ""))))
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests?
-               (invoke "pytest")))))))
     (home-page "https://github.com/banesullivan/scooby")
     (synopsis "Report hardware information and Python package versions")
     (description
@@ -39239,6 +39233,26 @@  (define-public python-catalogue
 Pickle for serialization, which has many drawbacks.")
     (license license:expat)))
 
+(define python-no-version
+  (package
+    (name "python-no-version")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "no_version" version))
+       (sha256
+        (base32 "1y58fkwg4s96hbz3hnqj2nd8a0pimrmpk4ry1z5pwzxlyx0k66rf"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list #:tests? #f)) ; this is a dummy package
+    (native-inputs (list python-setuptools python-wheel))
+    (home-page "https://github.com/prisae/no_version")
+    (synopsis "Package without __version__ number")
+    (description "This is a dummy package that does not contain a version
+number, only useful for testing purposes.")
+    (license license:cc0)))
+
 (define-public python-wasabi
   (package
     (name "python-wasabi")