From patchwork Sat Dec 16 13:23:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Figiel X-Patchwork-Id: 57653 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 A38FE27BBEA; Sat, 16 Dec 2023 20:01:26 +0000 (GMT) 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=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 7A15A27BBE2 for ; Sat, 16 Dec 2023 20:01:25 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEaqS-0008RB-H8; Sat, 16 Dec 2023 15:01:08 -0500 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 1rEaqL-0008Jq-Vx for guix-patches@gnu.org; Sat, 16 Dec 2023 15:01:02 -0500 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 1rEaqL-0006Cg-Mg for guix-patches@gnu.org; Sat, 16 Dec 2023 15:01:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEaqM-00028M-5y for guix-patches@gnu.org; Sat, 16 Dec 2023 15:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67855] [PATCH] gnu: python-cookiecutter: Update to 2.5.0. Resent-From: Troy Figiel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Dec 2023 20:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67855 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67855@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17027568456267 (code B ref -1); Sat, 16 Dec 2023 20:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Dec 2023 20:00:45 +0000 Received: from localhost ([127.0.0.1]:56112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEaq4-0001c1-H0 for submit@debbugs.gnu.org; Sat, 16 Dec 2023 15:00:45 -0500 Received: from lists.gnu.org ([2001:470:142::17]:43870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEaq1-0001HJ-G3 for submit@debbugs.gnu.org; Sat, 16 Dec 2023 15:00:43 -0500 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 1rEapt-0007xq-6f for guix-patches@gnu.org; Sat, 16 Dec 2023 15:00:33 -0500 Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rEapp-0005Jc-2V for guix-patches@gnu.org; Sat, 16 Dec 2023 15:00:32 -0500 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (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 4SsxlT6dHZz9sns for ; Sat, 16 Dec 2023 21:00:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1702756822; 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=Z/uDbg6YuasOHke5C96Ojh8XxKUKNK7UmVl1yW2YIjc=; b=ov0BFLjiylxPHtNUoGRwe3wIGjl4aiGFsHIMtwq8C5SrTsaKp7DMDsVBnRP61rL2NvV+Sd YAO7EFjBW9+Q9cGY94RfUQ/8r4iaewUZHt7++ufJXccn1jtiCJgW2vrl38RTluPLRxOBuw zlBe/Brj8mm9Gtq1D5Lf6YR5yFl5Av9LlcVo9k+q94OroN5NsIOlYAAcfncYXgzRD7YRVk s8QJmmYb5qHvI8eAoRrUVO722lDjnkiclLciE355LeknOlawGRsa1i1EEhd/+daUKjqCzx bmOzfGdkPFXy8a8ARQCXBzOcTszHtjjVVXinR3t8NfxvoQSjlyN/QC9q98kHeA== From: Troy Figiel Date: Sat, 16 Dec 2023 14:23:48 +0100 Message-ID: <87sf41hq96.fsf@troyfigiel.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4SsxlT6dHZz9sns Received-SPF: pass client-ip=2001:67c:2050:0:465::101; envelope-from=troy@troyfigiel.com; helo=mout-p-101.mailbox.org X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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-xyz.scm (python-cookiecutter): Update to 2.5.0. [arguments]<#:phases>: Add 'pre-check phase to set a writable home directory and patch dynamically generated shebangs. Replace the default check phase to use pytest. [native-inputs]: Add bash-minimal and git. Remove python-pytest-catchlog. [propagated-inputs]: Add python-arrow, python-pyyaml and python-rich. Remove python-future, python-jinja2-time, python-poyo, python-text-unidecode and python-whichcraft. Change-Id: Ifc612136fa9a67ad643d0e1c031d173a3b3904a4 --- gnu/packages/python-xyz.scm | 51 +++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 16 deletions(-) base-commit: d5298c5e334e56a9aabddcb62d312e63135864f6 diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 86f8d81689..b8e465020f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -17494,28 +17494,47 @@ (define-public python-whichcraft (define-public python-cookiecutter (package (name "python-cookiecutter") - (version "1.7.3") + (version "2.5.0") (source (origin (method url-fetch) (uri (pypi-uri "cookiecutter" version)) (sha256 - (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb")))) + (base32 "1v1iafk8j2f5cciw9mf4263v91070c6z049cpnw42gwffhs907p6")))) (build-system python-build-system) - (native-inputs - (list python-freezegun python-pytest python-pytest-catchlog - python-pytest-cov python-pytest-mock)) - (propagated-inputs - (list python-binaryornot - python-click - python-future - python-jinja2 - python-jinja2-time - python-poyo - python-requests - python-slugify - python-text-unidecode - python-whichcraft)) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + ;; test_get_user_config.py requires a writable home + ;; directory. + (setenv "HOME" + (getcwd)) + ;; test_hooks.py dynamically creates shell scripts + ;; with a /bin/bash shebang. We have to patch these. + (substitute* "tests/test_hooks.py" + (("/bin/bash") + (string-append #$(this-package-native-input + "bash-minimal") "/bin/bash"))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest"))))))) + (native-inputs (list bash-minimal + git + python-freezegun + python-pytest + python-pytest-cov + python-pytest-mock)) + (propagated-inputs (list python-arrow + python-binaryornot + python-click + python-jinja2 + python-pyyaml + python-requests + python-rich + python-slugify)) (home-page "https://github.com/cookiecutter/cookiecutter") (synopsis "Command-line utility that creates projects from project templates")