From patchwork Sat Oct 19 22:46:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Figiel X-Patchwork-Id: 69156 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 6069127BBEA; Sun, 20 Oct 2024 15:08:57 +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 9548B27BBE2 for ; Sun, 20 Oct 2024 15:08:56 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2Wbm-0007BI-BV; Sun, 20 Oct 2024 10:08:38 -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 1t2Wbk-00079j-Sr for guix-patches@gnu.org; Sun, 20 Oct 2024 10:08:36 -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 1t2Wbk-0004kA-K5 for guix-patches@gnu.org; Sun, 20 Oct 2024 10:08:36 -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=gYD8bdlxFo7FQG1E5VFBE7GgU39OAdU5rQwiEi6z/9M=; b=eCU8V3Ycm9w9KQ1bZygMKMrBbuVqQrLu004Q89lUI3IRcpO+XGp8HCVkfcA7dwm31/22pMqu2fCQGrylVaZ6yTywBxyPPDIexkIxDEyWSdNxTLnEPbnAV/3MS4Qdph/siXAYychOJ0IYaLfppSlC5Mj0mCGbpqLwJ1X3f2r7bCsBFKNPpJT6M2HTidbUHupqvRra3obs0+7EWL+Cde+t8hVs46Y2iEXrZf9W1CKBXoPgrsVcbD3y8sC1g9MvGWW3xU+E8WkFhZDF7p3owosomNfpHKKQRuMCHER0H1FBxPXlX0qWeAx2VbBl4Ut/VGU0uhEmqzMpJS+D+Mwq/mDyAQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2Wc9-0001pD-O7 for guix-patches@gnu.org; Sun, 20 Oct 2024 10:09:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73910] [PATCH 2/3] gnu: Add python-icontract. 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:09:01 +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.17294333346996 (code B ref 73910); Sun, 20 Oct 2024 14:09:01 +0000 Received: (at 73910) by debbugs.gnu.org; 20 Oct 2024 14:08:54 +0000 Received: from localhost ([127.0.0.1]:47919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Wc1-0001ol-JC for submit@debbugs.gnu.org; Sun, 20 Oct 2024 10:08:54 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:38118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Wbz-0001oU-Ef for 73910@debbugs.gnu.org; Sun, 20 Oct 2024 10:08:52 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (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-101.mailbox.org (Postfix) with ESMTPS id 4XWgJd74gHz9sZZ for <73910@debbugs.gnu.org>; Sun, 20 Oct 2024 16:08:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1729433298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=gYD8bdlxFo7FQG1E5VFBE7GgU39OAdU5rQwiEi6z/9M=; b=tBqVN5Xm7FY2SSi1QTwO5Fv9Q+uxQZMN/I64MmXbK2Ab+1RJ/HwHlz5fLCNquX0V3Dk6bY MG9K55BqSa1usn+L2t2T/5sF1jx8wY4TbOiWjpQma8GU4KyS+uqHa5jL7oGuIFSoKtQR9i kn3mnWtZib8EG+Up/AVdX6FT88SDjR3lbr9YUMlDL71GX8G5FhYYs3Y2Y0nH0HdZUq1RpZ XitRXsKLRjXfJh0YhSdpJ1DYJQinubHCuxXlBwr47aimMIBhs2HnF3KbN6MoXWqzJng+Lc Nawpho8YGN5flmqYJN9ErAipBxHeaYRjyHZA7p2EQ4CtajcpqUWtitgyCS2gyg== From: Troy Figiel Date: Sun, 20 Oct 2024 00:46:39 +0200 Message-ID: <87a5eyq33i.fsf@troyfigiel.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4XWgJd74gHz9sZZ 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/python-check.scm (python-icontract): New variable. Change-Id: I48dc21cbed1ff68356099b1c3db351427dff60c7 --- gnu/packages/python-check.scm | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 4eb6cb1a10..4bfb88fd39 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -161,6 +161,43 @@ (define-public python-beartype written in pure Python.") (license license:expat))) +(define-public python-icontract + (package + (name "python-icontract") + (version "2.7.1") + (source + (origin + ;; There are no tests in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/Parquery/icontract") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1fix7wx899kn8vp9aa5m6q71la48gx3qqx4qd74535m61pb50r7f")))) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-before 'check 'set-icontract-slow + (lambda _ + ;; Setting ICONTRACT_SLOW, does not enable a slow test + ;; suite. It only causes a single test to run, that + ;; checks the value of icontract.SLOW is set correctly. + (setenv "ICONTRACT_SLOW" "1")))))) + (build-system pyproject-build-system) + (propagated-inputs (list python-asttokens python-typing-extensions)) + (native-inputs (list python-asyncstdlib python-numpy python-astor + python-typeguard-4 python-mypy)) + (home-page "https://icontract.readthedocs.io") + (synopsis "Design-by-contract programming for Python") + (description + "@code{icontract} brings design-by-contract to Python with informative +violation messages and inheritance. @code{icontract} provides two function, +@code{require} and @code{ensure} for preconditions and postconditions +respectively. Additionally, it provides a class decorator, @code{invariant}, +to establish class invariants.") + (license license:expat))) + (define-public python-pytest-click (package (name "python-pytest-click")