From patchwork Fri Apr 22 01:03:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 38732 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 6F99827BBEA; Fri, 22 Apr 2022 02:04:23 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 3492127BBE9 for ; Fri, 22 Apr 2022 02:04:23 +0100 (BST) Received: from localhost ([::1]:51550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhhig-0006un-AG for patchwork@mira.cbaines.net; Thu, 21 Apr 2022 21:04:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhhiO-0006no-CI for guix-patches@gnu.org; Thu, 21 Apr 2022 21:04:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhhiO-0000IF-3z for guix-patches@gnu.org; Thu, 21 Apr 2022 21:04:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nhhiO-00040y-0g for guix-patches@gnu.org; Thu, 21 Apr 2022 21:04:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55060] [PATCH 5/6] gnu: Add python-scooby. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Apr 2022 01:04:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55060 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55060@debbugs.gnu.org Cc: "Paul A. Patience" Received: via spool by 55060-submit@debbugs.gnu.org id=B55060.165058940515333 (code B ref 55060); Fri, 22 Apr 2022 01:04:03 +0000 Received: (at 55060) by debbugs.gnu.org; 22 Apr 2022 01:03:25 +0000 Received: from localhost ([127.0.0.1]:51120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhhhl-0003zF-4B for submit@debbugs.gnu.org; Thu, 21 Apr 2022 21:03:25 -0400 Received: from mail-4022.proton.ch ([185.70.40.22]:56558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhhhj-0003ym-4J for 55060@debbugs.gnu.org; Thu, 21 Apr 2022 21:03:23 -0400 Date: Fri, 22 Apr 2022 01:03:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1650589397; bh=MVSBUUZlDNbUJEEiM0S0O4Xrc9xlEzsa1htr6qP5bsI=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=ZesG9RIOOmzhT6JNCM4TBJ3+TEnxpiPknVltkScLH01/Ubq8ZG2yXy7Yys++Tv83z w8dj+KroA8f8qE6bKcOHwiMUzyMorYFFbnGd34qcEX3lxpOW7ivtSS88gqMUkLM4Nf BPqrm2ImmADqWc9VIgz/7As55Uy4CBC0A55nPoCJ9magH2hbo24cf0hyt6G9nte3Nt YB12Us5Fue0FYu8oD0WxPLkuahaUyLd+f1n8vYVtttHFhkwLfaGIaykQrFatkTHBWj 0S1vv6HArsfGTMkfEbcyLzFECYFIec9fe2uyqPnyMLOeKdz7f948tJ7m71jYGuP/R2 hnFvOVod9dCqw== From: "Paul A. Patience" Message-ID: <20220422010244.23280-5-paul@apatience.com> In-Reply-To: <20220422010244.23280-1-paul@apatience.com> References: <20220422010244.23280-1-paul@apatience.com> Feedback-ID: 19227857:user:proton MIME-Version: 1.0 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: , Reply-To: "Paul A. Patience" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-scooby): New variable. --- gnu/packages/python-xyz.scm | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) -- 2.35.1 diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 9a5d311680..799a6441ea 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -29534,3 +29534,50 @@ (define-public python-sre-yield uses the parsed regular expression, so you get a much more accurate result than trying to just split strings.") (license license:asl2.0))) + +(define-public python-scooby + (package + (name "python-scooby") + (version "0.5.12") + (source + ;; The PyPI tarball does not contain the tests. + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/banesullivan/scooby") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1gkpmz8wl3jg8ylf1na35308sznw2g9wx33zqlyq5i2gpy2ml9mw")))) + (build-system python-build-system) + (native-inputs + (list python-beautifulsoup4 + python-numpy + python-pytest + python-pytest-cov + python-scipy)) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-tests + (lambda _ + (substitute* "tests/test_scooby.py" + ;; The test suite uses the no-version PyPI package + ;; (https://pypi.org/project/no-version/), + ;; but it doesn't seem worth packaging in Guix just for this. + (("scooby\\.report\\.VERSION_NOT_FOUND") + "scooby.report.MODULE_NOT_FOUND") + (("^ +import no_version # noqa.*") "") + (("with pytest\\.raises\\(OSError\\):") + "with pytest.raises(ModuleNotFoundError):")))) + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest"))))))) + (home-page "https://github.com/banesullivan/scooby") + (synopsis "Great Dane turned Python environment detective") + (description + "This is a lightweight tool for easily reporting your Python +environment's package versions and hardware resources.") + (license license:expat)))