From patchwork Sat Oct 19 23:03:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Troy Figiel X-Patchwork-Id: 69158 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 47FAD27BBEA; Sun, 20 Oct 2024 15:09:54 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2F94A27BBE2 for ; Sun, 20 Oct 2024 15:09:53 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2Wcq-0008Bu-LT; Sun, 20 Oct 2024 10:09:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2Wck-00089q-Om for guix-patches@gnu.org; Sun, 20 Oct 2024 10:09:40 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t2Wcj-0004n1-LU for guix-patches@gnu.org; Sun, 20 Oct 2024 10:09:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=QJIFXzKQNNWPMDTck2DJ0My+cxQKrPyAdj3KP4wDvg8=; b=AIl5yoczOYqiU4tvpVzOzhF5To4Po9WG6LlCLxcFNLbBcYqNovxjdipT1yiW4mQeB1taopZaJ38bx5Ehdpm2DOfdIUjwdwYv3Eiwz113MB+S0qyN8VitCv1pk1d/VmIFUqcqXiXhj/os9qUuGsnoenJ1ZQmYV/g3bWMD87RUKGcS0hhb3BKaspt8R+Venw6+W7xb6W2nrhewjtyiLq0Xv0zfG5qeQd3/flNdfJfaXkrUeR7FbFZxSmvLq9LHhd+LwNi9RZPZNukRSe82ER1wFomq3JJ8vvckr/mUxBy+NzheYNajOtzHdplNd1gDdblRhWX1usvxWTkIhxk/nDaMdQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2Wd8-0001rV-PX for guix-patches@gnu.org; Sun, 20 Oct 2024 10:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73910] [PATCH 3/3] gnu: Add python-crosshair. References: <87cyjvos0w.fsf@troyfigiel.com> In-Reply-To: <87cyjvos0w.fsf@troyfigiel.com> Resent-From: Troy Figiel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 20 Oct 2024 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73910 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73910@debbugs.gnu.org Received: via spool by 73910-submit@debbugs.gnu.org id=B73910.17294333797108 (code B ref 73910); Sun, 20 Oct 2024 14:10:02 +0000 Received: (at 73910) by debbugs.gnu.org; 20 Oct 2024 14:09:39 +0000 Received: from localhost ([127.0.0.1]:47928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Wck-0001qa-OU for submit@debbugs.gnu.org; Sun, 20 Oct 2024 10:09:39 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:36010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Wci-0001qG-6D for 73910@debbugs.gnu.org; Sun, 20 Oct 2024 10:09:37 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4XWgJx0sqkz9sTZ for <73910@debbugs.gnu.org>; Sun, 20 Oct 2024 16:08:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1729433313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJIFXzKQNNWPMDTck2DJ0My+cxQKrPyAdj3KP4wDvg8=; b=UUWN33ptllOb4HSSyyUpH1L8Yag+nIP+P4NUKkdGANOPbWmr5nMazAp7T9LnATzknQBGmG vRLLNouXmpTfCtBi6VAWtWrYgVpZEMsdK3KZu0gxzPvwk2Wkxci6yEWs5xeeijMJMsPfJE DmNS0xnX/auncUxHumvmk9VPpMtjoNkd1663sbHEioQClCuIcSab1k5rxAPfRY3c8gwWjU vvzTqyyKcWryB25j0zqNGz+y+TwUlShDQhM3CGSAMAEUr0ERZDmi9LTXVlhGVRRef/WFI9 48Y70LjZIOYNzu2FJ77QJq2amua9ZZb3XXgtCraI8f4r5pBRfcSizwAk19byLQ== From: Troy Figiel Date: Sun, 20 Oct 2024 01:03:13 +0200 Message-ID: <878quiq333.fsf@troyfigiel.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4XWgJx0sqkz9sTZ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/check.scm (python-crosshair): New variable. Change-Id: I7af183df882049c19d562cd15a23f3f3233309a9 --- gnu/packages/check.scm | 55 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 8d41996c71..32a6d32791 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -47,7 +47,7 @@ ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Reza Housseini ;;; Copyright © 2023 Hilton Chain -;;; Copyright © 2023 Troy Figiel +;;; Copyright © 2023, 2024 Troy Figiel ;;; Copyright © 2024 Giacomo Leidi ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Navid Afkhami @@ -2730,6 +2730,59 @@ (define-public python-pytest-sugar 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 "-n" "auto") + #: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 'disable-broken-tests + (lambda _ + (setenv "PYTHONHASHSEED" "0") ;tests rely on this value + ;; check_examples_test.py contains failing tests that + ;; show what happens if a counterexample is found. + (delete-file + "crosshair/examples/check_examples_test.py") + (delete-file "crosshair/lsp_server_test.py")))))) ;requires pygls + (propagated-inputs (list python-typeshed-client python-typing-inspect z3)) + (native-inputs (list python-icontract ;optional + python-importlib-metadata + python-mypy + python-numpy + python-pytest + python-pytest-xdist)) + (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")