[bug#77895,v2,09/10] gnu: python-hypothesmith: Update to 0.2.0.

Message ID 20250422140051.2273-9-ngraves@ngraves.fr
State New
Headers
Series [bug#77895,v2,01/10] gnu: Add python-lark. |

Commit Message

Nicolas Graves April 22, 2025, 2 p.m. UTC
  * gnu/packages/check.scm (python-hypothesmith): Update to 0.2.0.
  [build-system]: Switch to pyproject-build-system.
  [arguments]<test-flags>: Ignore failing tests.
  <phases>: Add 'patch-lark-dependency test.
  [propagated-inputs]: Replace python-lark-parser by python-lark.
  [native-inputs]: Add python-black, python-parso, python-pytest,
  python-pytest-cov, python-setuptools, python-wheel.
---
 gnu/packages/check.scm | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)
  

Patch

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 3580841047..30dc256a84 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -2898,17 +2898,38 @@  (define-deprecated python-hypothesis-next python-hypothesis)
 (define-public python-hypothesmith
   (package
     (name "python-hypothesmith")
-    (version "0.1.8")
+    (version "0.2.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "hypothesmith" version))
        (sha256
-        (base32
-         "02j101m5grjrbvrgjap17jsxd1hgawkylmyswcn33vf42mxh9zzr"))))
-    (build-system python-build-system)
+        (base32 "08kr9p6hjm3ys87k1k3l79cmf936qbhn21ab8zadsvnp0gyv7dqg"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      #~(list "-k"
+              (string-append
+               ;; XXX: hypothesis.errors.Unsatisfiable
+               "not test_source_code_from_libcst_node_type[MatchSingleton]"
+               ;; XXX: Python/Black versions not as expected.
+               " and not test_black_autoformatter_from_grammar"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-lark-dependency
+            (lambda _
+              (substitute* "setup.py"
+                (("lark-parser>=[0-9.]*") "lark")))))))
     (propagated-inputs
-     (list python-hypothesis python-lark-parser python-libcst-minimal))
+     (list python-hypothesis python-lark python-libcst-minimal))
+    (native-inputs
+     (list python-black
+           python-parso
+           python-pytest
+           python-pytest-cov
+           python-setuptools
+           python-wheel))
     (home-page "https://github.com/Zac-HD/hypothesmith")
     (synopsis "Strategies for generating Python programs")
     (description