From 0d1286f0e4d9ad9bcd89d5ffcda51bd46e47460c Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 22 Apr 2025 22:13:34 +0100 Subject: gnu: python-crosshair: Move to python-check. * gnu/packages/check.scm (python-crosshair): Move from here ... * gnu/packages/python-check.scm: ... to here. Change-Id: I56a246ddc6dee0a28d0432fabc4fe4b2bcea6bc0 --- gnu/packages/python-check.scm | 63 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index df585f20a60..fa2769185d5 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2020 Edouard Klein ;;; Copyright © 2020, 2021 Vinicius Monego ;;; Copyright © 2020 Tanguy Le Carrour -;;; Copyright © 2021-2024 Sharlatan Hellseher +;;; Copyright © 2021-2025 Sharlatan Hellseher ;;; Copyright © 2021 Brendan Tildesley ;;; Copyright © 2021, 2022 Guillaume Le Vaillant ;;; Copyright © 2021 Bonface Munyoki Kilyungi @@ -18,7 +18,7 @@ ;;; Copyright © 2022 Felix Gruber ;;; Copyright © 2022 Tomasz Jeneralczyk ;;; Copyright © 2022 jgart -;;; Copyright © 2024 Troy Figiel +;;; Copyright © 2024-2025 Troy Figiel ;;; Copyright © 2024 Navid Afkhami ;;; Copyright © 2024 David Elsing ;;; Copyright © 2024 Eric Bavier @@ -51,6 +51,7 @@ #:use-module (gnu packages django) #:use-module (gnu packages docker) #:use-module (gnu packages jupyter) + #:use-module (gnu packages maths) #:use-module (gnu packages openstack) #:use-module (gnu packages perl) #:use-module (gnu packages python-build) @@ -443,6 +444,64 @@ This package provides seamless integration with coverage.py (and thus pytest, nosetests, etc...) in Python projects.") (license license:expat))) +(define-public python-crosshair + (package + (name "python-crosshair") + (version "0.0.86") + (source + (origin + (method url-fetch) + (uri (pypi-uri "crosshair_tool" version)) + (sha256 + (base32 "19zrv6gsap0qwn4rrs1wwajg0gkq7ys8qijsilmjrhc73dylgl72")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "--numprocesses" (number->string (parallel-job-count)) + ;; 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") "") + ;; '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 + python-setuptools + python-wheel)) + (propagated-inputs + (list python-importlib-metadata + python-packaging + ;; python-pygls + python-typeshed-client + python-typing-inspect + python-typing-extensions + 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-cucumber-tag-expressions (package (name "python-cucumber-tag-expressions") -- cgit v1.3