diff options
author | Troy Figiel <troy@troyfigiel.com> | 2024-10-20 01:03:13 +0200 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-10-26 11:11:48 +0100 |
commit | 3ffb386e3f56b3ee41fab7463b3d67d2bef93d3f (patch) | |
tree | abf1dae3779e86834cce6df50a5e8ee8d401d5c6 | |
parent | 0250eed22d4a3bb80865d7dd6caa2ea9b169c5d2 (diff) | |
download | guix-3ffb386e3f56b3ee41fab7463b3d67d2bef93d3f.tar guix-3ffb386e3f56b3ee41fab7463b3d67d2bef93d3f.tar.gz |
gnu: Add python-crosshair.
* gnu/packages/check.scm (python-crosshair): New variable.
Change-Id: I7af183df882049c19d562cd15a23f3f3233309a9
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r-- | gnu/packages/check.scm | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 8d41996c71..6593eadf6a 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -47,7 +47,7 @@ ;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu> ;;; Copyright © 2023 Reza Housseini <reza@housseini.me> ;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space> -;;; Copyright © 2023 Troy Figiel <troy@troyfigiel.com> +;;; Copyright © 2023, 2024 Troy Figiel <troy@troyfigiel.com> ;;; Copyright © 2024 Giacomo Leidi <goodoldpaul@autistici.org> ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Navid Afkhami <navid.afkhami@mdc-berlin.de> @@ -2730,6 +2730,61 @@ look and feel of py.test, using a progress bar and showing failures and errors instantly.") (license license:bsd-3))) +(define-public python-crosshair + (package + (name "python-crosshair") + (version "0.0.76") + (source + (origin + (method url-fetch) + (uri (pypi-uri "crosshair-tool" version)) + (sha256 + (base32 "1yvbhzs7r85gn4d7drl7p7vi1f5cga1xyy3mzxy3fglyf8kxyakh")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "--numprocesses" "auto" + ;; check_examples_test.py contains failing tests that + ;; show what happens if a counterexample is found. + "--ignore=crosshair/examples/check_examples_test.py" + "--ignore=crosshair/lsp_server_test.py") ;requires pygls + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-dependencies + (lambda _ + (substitute* "setup.py" + ;; pygls is only used by crosshair/lsp_server.py. + (("pygls>=1.0.0") "") + ;; Tests still pass with typing-inspect==0.6.0 + ;; packaged by Guix. + (("typing-inspect>=0.7.1") "typing-inspect>=0.6.0") + ;; 'sanity-check fails for z3-solver, although it is + ;; included in 'propagated-inputs. + (("z3-solver==4.13.0.0") "")))) + (add-before 'check 'set-test-env + (lambda _ + (setenv "PYTHONHASHSEED" "0")))))) ;tests rely on this value + (native-inputs + (list python-icontract ;optional + python-importlib-metadata + python-mypy + python-numpy + python-pytest + python-pytest-xdist)) + (propagated-inputs + (list python-typeshed-client + python-typing-inspect + z3)) + (home-page "https://crosshair.readthedocs.io") + (synopsis "Analysis tool for Python using symbolic execution") + (description + "@code{crosshair} is an analysis tool for Python that works by repeatedly +calling your functions with symbolic inputs. It uses an @acronym{SMT, +Satisfiability modulo theories} solver explore viable execution paths and find +counterexamples for you.") + (license (list license:asl2.0 license:expat license:psfl)))) + (define-public python-hypothesis (package (name "python-hypothesis") |