From patchwork Thu Sep 16 16:21:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 32916 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 894C227BBE3; Thu, 16 Sep 2021 17:48:14 +0100 (BST) 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 4487527BBE1 for ; Thu, 16 Sep 2021 17:48:14 +0100 (BST) Received: from localhost ([::1]:43074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQuYX-0007Pn-CA for patchwork@mira.cbaines.net; Thu, 16 Sep 2021 12:48:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQuBA-0006pV-BN for guix-patches@gnu.org; Thu, 16 Sep 2021 12:24:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44845) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQuB9-0004Te-Hv for guix-patches@gnu.org; Thu, 16 Sep 2021 12:24:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQuB9-0007Gm-CL for guix-patches@gnu.org; Thu, 16 Sep 2021 12:24:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50018] [PATCH v3 09/21] gnu: python-aws-sam-translator: Change source for tests. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Sep 2021 16:24:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50018 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50018@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 50018-submit@debbugs.gnu.org id=B50018.163180940027701 (code B ref 50018); Thu, 16 Sep 2021 16:24:03 +0000 Received: (at 50018) by debbugs.gnu.org; 16 Sep 2021 16:23:20 +0000 Received: from localhost ([127.0.0.1]:56354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQuAS-0007Ca-0J for submit@debbugs.gnu.org; Thu, 16 Sep 2021 12:23:20 -0400 Received: from mout02.posteo.de ([185.67.36.66]:42815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQuAK-0007Bd-AY for 50018@debbugs.gnu.org; Thu, 16 Sep 2021 12:23:12 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B0CF1240103 for <50018@debbugs.gnu.org>; Thu, 16 Sep 2021 18:23:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1631809386; bh=ScL7y8F4E1MwR5wxh5AD/yhOhLaIrCLlGBjorKmABVw=; h=From:To:Cc:Subject:Date:From; b=QMd/675V9GS3CsznlOBfX5DxvDQFTJ2FCVozr8CdxBLMcJA46dhP59FdhLJSptsVG xmEh76O0/7yAkpGobHej9ZB4LZWfNK2hbd+rhurG2fAWCecLUlNT2Eyzih6f1BHTlp m2w7xXmDGnkPVQ3Qj8SwE3usfVWLIxskVf7RHkS9wQ6PzGsUDwZ3BLiWw291QR7aiF HPgImt4HIxBKwbOiJzq91u72S2V5PRKmTO/37JR4tqfINUNKhKwlKD5VS7g/EMyifF tBkJD2i4LSotgIryvWU5K9Ayeih/of3fUNxnhFwZ/Pa6FvRhyHR9v4crBLL/uwLx2m RHqFeQFexOqJQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4H9Mnj6Hprz9rxK; Thu, 16 Sep 2021 18:23:05 +0200 (CEST) From: Vinicius Monego Date: Thu, 16 Sep 2021 16:21:00 +0000 Message-Id: <20210916162112.54462-10-monego@posteo.net> In-Reply-To: <20210916162112.54462-1-monego@posteo.net> References: <20210916162112.54462-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-web.scm (python-aws-sam-translator)[source]: Fetch from GitHub. Make some cosmetic changes. [arguments]: Change explanation on why tests are disabled. Make some cosmetic changes. [native-inputs]: Add python-black, python-click, python-coverage, python-dateparser, python-docopt, python-flake8, python-mock, python-parameterized, python-pathlib2, python-pylint, python-pytest, python-pytest-cov, python-pyyaml, python-requests. --- gnu/packages/python-web.scm | 57 +++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 5449911f3f..fc3f1473af 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -377,26 +377,47 @@ WSGI. This package includes libraries for implementing ASGI servers.") (package (name "python-aws-sam-translator") (version "1.38.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "aws-sam-translator" version)) - (sha256 - (base32 - "1djwlsjpbh13m4biglimrm9lq7hmla0k29giay7k3cjsrylxvjhf")))) + (source + (origin + ;; PyPI tarball does not include tests. + (method git-fetch) + (uri (git-reference + (url "https://github.com/aws/serverless-application-model") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0nn9jfqz13kzmxm0r9vy24p8sqxv3mrm5d3lx7ah6rc581q8nv1k")))) (build-system python-build-system) (arguments - `(;; XXX: Tests are not distributed with the PyPI archive, and would - ;; introduce a circular dependency on python-cfn-lint. - #:tests? #f - #:phases (modify-phases %standard-phases - (add-after 'unpack 'loosen-requirements - (lambda _ - ;; The package needlessly specifies exact versions - ;; of dependencies, when it works fine with others. - (substitute* "requirements/base.txt" - (("(.*)(~=[0-9\\.]+)" all package version) - package)) - #t))))) + ;; FIXME: 25 test failures divided in the following two errors: + ;; 'botocore.exceptions.NoRegionError: You must specify a region.' + ;; AttributeError: 'TestDeploymentPreferenceCollection' object has + ;; no attribute 'function_logical_id'. + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'loosen-requirements + (lambda _ + ;; The package needlessly specifies exact versions + ;; of dependencies, when it works fine with others. + (substitute* "requirements/base.txt" + (("(.*)(~=[0-9\\.]+)" all package version) + package))))))) + (native-inputs + `(("python-black" ,python-black) + ("python-click" ,python-click) + ("python-coverage" ,python-coverage) + ("python-dateparser" ,python-dateparser) + ("python-docopt" ,python-docopt) + ("python-flake8" ,python-flake8) + ("python-mock" ,python-mock) + ("python-parameterized" ,python-parameterized) + ("python-pathlib2" ,python-pathlib2) + ("python-pylint" ,python-pylint) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pyyaml" ,python-pyyaml) + ("python-requests" ,python-requests))) (propagated-inputs `(("python-boto3" ,python-boto3) ("python-jsonschema" ,python-jsonschema)