From patchwork Fri Nov 5 01:58:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 34251 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 2391827BBE3; Fri, 5 Nov 2021 02:00:54 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8E78727BBE1 for ; Fri, 5 Nov 2021 02:00:53 +0000 (GMT) Received: from localhost ([::1]:59118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mioXE-0001dq-OL for patchwork@mira.cbaines.net; Thu, 04 Nov 2021 22:00:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mioWT-0000mL-OK for guix-patches@gnu.org; Thu, 04 Nov 2021 22:00:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mioWT-0005oy-Ea for guix-patches@gnu.org; Thu, 04 Nov 2021 22:00:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mioWT-0004GJ-Df for guix-patches@gnu.org; Thu, 04 Nov 2021 22:00:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51396] [PATCH v2 7/8] gnu: python-moto: Update to 2.2.12. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 Nov 2021 02:00:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51396 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51396@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 51396-submit@debbugs.gnu.org id=B51396.163607760116290 (code B ref 51396); Fri, 05 Nov 2021 02:00:05 +0000 Received: (at 51396) by debbugs.gnu.org; 5 Nov 2021 02:00:01 +0000 Received: from localhost ([127.0.0.1]:44046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mioWO-0004Eg-PJ for submit@debbugs.gnu.org; Thu, 04 Nov 2021 22:00:01 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mioWN-0004EG-Iq for 51396@debbugs.gnu.org; Thu, 04 Nov 2021 22:00:00 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id CC1F8240101 for <51396@debbugs.gnu.org>; Fri, 5 Nov 2021 02:59:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1636077593; bh=RG6kgYMi7R0aGgaQ6h+qlQSxqdjBITixeA5A7yt/dzg=; h=From:To:Cc:Subject:Date:From; b=F31v7lQkwGDhetpVbLa9BHBEnfMKFHUQq3cC3qaTdNAsZsQ7z+aeG/6sakZmJ4iUU m/sz3gp2FVTjRviw8jH8XUXh3niy0M48ymrENBFk+samMi4bVJV2nQfe4Dfy2zmKty 2dgkVOcWDy4tUzUArQ4csaM7N1JUM+zxJDSrqM9+iYV9Pl/u6vR0K3tQStpWnVav2T fLnf1C6Xg3lcvswsAOxf08Fco8iq5cq/7BZaCJumi5TZXqCprc4jvt+liU1qMAiLO3 VEvYxhAvdf0Gtyx0cJ+GmMvrJGwGzlVrCujGQnXu6GU/RKp580CM0PjV5iOogpDENY LL1dSyG95Or7Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HlkGc59fDz6tm9; Fri, 5 Nov 2021 02:59:52 +0100 (CET) From: Vinicius Monego Date: Fri, 5 Nov 2021 01:58:35 +0000 Message-Id: <20211105015836.1046845-7-monego@posteo.net> In-Reply-To: <20211105015836.1046845-1-monego@posteo.net> References: <20211105015836.1046845-1-monego@posteo.net> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-moto): Update to 2.2.12. [arguments]: Make some cosmetic changes. <#:phases>: Don't return #t. Support cross-compilation in 'patch-hardcoded-executable-names. Skip more tests and simplify the custom 'check phase. --- gnu/packages/python-xyz.scm | 51 ++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 24aa9d95a7..528e3b025a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13095,34 +13095,41 @@ text.") (define-public python-moto (package (name "python-moto") - ;; XXX: Use a pre-release for compatibility with latest botocore & friends. - (version "1.3.16.dev134") + (version "2.2.12") (source (origin (method url-fetch) (uri (pypi-uri "moto" version)) (sha256 (base32 - "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd")))) + "0pvay0jp119lzzwf5qj5h6311271yq0w2i6344ds20grpf6g6gz8")))) (build-system python-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-hardcoded-executable-names - (lambda _ - (substitute* "moto/batch/models.py" - (("/bin/sh") - (which "sh"))) - (substitute* (find-files "tests" "\\.py$") - (("#!/bin/bash") - (string-append "#!" (which "bash")))) - #t)) - (replace 'check - (lambda _ - (setenv "PYTHONPATH" (string-append "./build/lib:" - (getenv "PYTHONPATH"))) - (invoke "pytest" "-vv" "-m" "not network" - ;; These tests require Docker. - "-k" "not test_terminate_job \ -and not test_invoke_function_from_sqs_exception")))))) + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-hardcoded-executable-names + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash-exec (string-append + (assoc-ref inputs "bash") + "/bin/sh"))) + (substitute* "moto/batch/models.py" + (("/bin/sh") bash-exec)) + (substitute* (find-files "tests" "\\.py$") + (("#!/bin/bash") (string-append "#!" bash-exec)))))) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "-m" "not network" "-k" + (string-append + ;; These tests require Docker. + "not test_terminate_job" + " and not test_invoke_function_from_sqs_exception" + " and not test_rotate_secret_lambda_invocations" + ;; These tests also require the network. + " and not test_put_record_batch_http_destination" + " and not test_put_record_http_destination" + " and not test_dependencies" + " and not test_cancel_running_job" + " and not test_container_overrides"))))))) (native-inputs `(("python-flask" ,python-flask) ("python-flask-cors" ,python-flask-cors) @@ -13130,6 +13137,8 @@ and not test_invoke_function_from_sqs_exception")))))) ("python-parameterized" ,python-parameterized) ("python-pytest" ,python-pytest) ("python-sure" ,python-sure))) + (inputs + `(("bash" ,bash-minimal))) (propagated-inputs `(("python-aws-xray-sdk" ,python-aws-xray-sdk) ("python-boto" ,python-boto)