From patchwork Fri Apr 21 20:04:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 49356 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 9A7D627BBE2; Fri, 21 Apr 2023 21:05:11 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 4FC0427BBE9 for ; Fri, 21 Apr 2023 21:05:09 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppx0B-0003uq-Vx; Fri, 21 Apr 2023 16:05:04 -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 1ppx0A-0003uS-QQ for guix-patches@gnu.org; Fri, 21 Apr 2023 16:05:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppx0A-0003L7-3y for guix-patches@gnu.org; Fri, 21 Apr 2023 16:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ppx09-0003Xa-UE for guix-patches@gnu.org; Fri, 21 Apr 2023 16:05:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62801] [PATCH v2 2/4] gnu: Add python-memory-profiler. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 21 Apr 2023 20:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62801 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62801@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 62801-submit@debbugs.gnu.org id=B62801.168210750013586 (code B ref 62801); Fri, 21 Apr 2023 20:05:01 +0000 Received: (at 62801) by debbugs.gnu.org; 21 Apr 2023 20:05:00 +0000 Received: from localhost ([127.0.0.1]:41219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppx07-0003Wx-Rw for submit@debbugs.gnu.org; Fri, 21 Apr 2023 16:05:00 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:49568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppx04-0003WN-T1 for 62801@debbugs.gnu.org; Fri, 21 Apr 2023 16:04:58 -0400 Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-2f8405b3dc1so1331296f8f.3 for <62801@debbugs.gnu.org>; Fri, 21 Apr 2023 13:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682107491; x=1684699491; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v1onHAhSfG+SiZQ94pQtdzqvGO1xAeV4CoQ8wKpY+Pg=; b=mb1wT28xQ7kXJ8OUFHPl7TvSgT7S9AcVzGqnCm7QLia7zUWi/RMcJtKvBF9lvjzYxL EaRbPGS/BQiKLwvNhMYx4UMM6Nn0iZGqdwQyd+SCwnSrZ+xgFGhIqXlvAXFnLfBo5VmX lp/uHtORPxnPC2U86B8aSkjRUu/K75s1E2jTD/qs6MtbaRum3arNictBv9da8tmM7il/ k39gI7yRjfc+3LEBUvaf6uH7OpU+atZVqxwNP3amVGvfgAehtXutwEZRenaEVsPmEJGj oISR2O6R6vnIVt9C1xN4eS2SYyqhwhQTKj2ATfZgSTOQ61h2Pa0Kn7lRM3hzkb28bjYi YvaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682107491; x=1684699491; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v1onHAhSfG+SiZQ94pQtdzqvGO1xAeV4CoQ8wKpY+Pg=; b=D7AEK9ux+HlctDrykcbqz1DyM2fITJpK7slWxH1qqZSr4pB9ovbWeER0j0/EJzDg4r +nz6iXyspwwFVp81ky/HrlR14siSo6tgAlywK359DW3coPLxOYAtilAVWcBj7PvZ3YPr i8Cs8+zh1O12XNSU7KIJAoqQF1h3KmZEcgOU98kELD9Rjv+JnLBgJtg0N9X6uQh6kiXB 1HhV7hSKFYh8f3L0stBWNZcGAoFhbjyF8WZLWM2vKgmb80FWY/ErkUIWFZlprl/E955B Z/RCGDvqMWHJnBxHHKbE/TJZJ5Bz4T1SK6rWfg9QV32SghvUxyoO21g68yiFHSVFx1C/ xfuQ== X-Gm-Message-State: AAQBX9eIrAf9wWBA720Gj/iJGQYM/JzZpwuR2RlmrEfQ5kae9IQLk7OV P+4n75hNNiEdxCZEMDunZfru6r7GDzY= X-Google-Smtp-Source: AKy350b/66tIuWSgHu9Mr10hTSHib+f26wQAjyWPWVHPRzQSRjTVurGeiUTeJoqPAUydSSibW3mFOg== X-Received: by 2002:adf:ec43:0:b0:2f9:46dd:d710 with SMTP id w3-20020adfec43000000b002f946ddd710mr4927323wrn.13.1682107490844; Fri, 21 Apr 2023 13:04:50 -0700 (PDT) Received: from guxtil.incerto.xyz (cpc100856-bagu15-2-0-cust368.1-3.cable.virginm.net. [82.25.93.113]) by smtp.gmail.com with ESMTPSA id r17-20020adfdc91000000b002ff2c39d072sm5062721wrj.104.2023.04.21.13.04.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 13:04:50 -0700 (PDT) From: Sharlatan Hellseher Date: Fri, 21 Apr 2023 21:04:44 +0100 Message-Id: <20230421200446.1899-2-sharlatanus@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230421200446.1899-1-sharlatanus@gmail.com> References: <20230421200446.1899-1-sharlatanus@gmail.com> 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: , 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-memory-profiler): New variable. --- gnu/packages/python-check.scm | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 9ce093697d..f1980a28a9 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -1779,6 +1779,57 @@ (define-public python-atpublic (license (list license:asl2.0 license:lgpl3)))) ; only for setup_helpers.py +(define-public python-memory-profiler + (package + (name "python-memory-profiler") + (version "0.61") + (source + (origin + ;; PyPi tarball lacks tests. + (method git-fetch) + (uri (git-reference + (url "https://github.com/pythonprofilers/memory_profiler") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0n6g47qqmnn7abh3v25535hd8bmfvhf9bnp72m7bkd89f715m7xh")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + ;; XXX: @profile is not loaded in some test files and there are 3 + ;; tests fail, disable them for now. + (add-after 'unpack 'disable-failing-tests + (lambda _ + (with-directory-excursion "test" + (for-each delete-file + '("test_as.py" + "test_func.py" + "test_gen.py" + "test_loop.py" + "test_loop_decorated.py" + "test_mprofile.py" + "test_nested.py" + "test_precision_command_line.py" + "test_unicode.py"))) + (substitute* "test/test_attributes.py" + (("def test_with_profile") "def __off_test_with_profile")) + (substitute* "test/test_stream_unicode.py" + (("def test_unicode") "def __off_test_unicode")) + (substitute* "test/test_tracemalloc.py" + (("def test_memory_profiler") + "def __off_test_memory_profiler"))))))) + (native-inputs + (list python-pytest-7.1 python-pytest-fixture-config python-safety)) + (propagated-inputs (list python-psutil)) + (home-page "https://github.com/pythonprofilers/memory_profiler") + (synopsis "Monitor Memory usage of Python code") + (description + "This package provides a module for monitoring memory usage of a python +program.") + (license license:bsd-3))) + (define-public python-mockito (package (name "python-mockito")