GNU bug report logs - #67855
[PATCH] gnu: python-cookiecutter: Update to 2.5.0.

Previous Next

Package: guix-patches;

Reported by: Troy Figiel <troy <at> troyfigiel.com>

Date: Sat, 16 Dec 2023 20:01:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67855 in the body.
You can then email your comments to 67855 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#67855; Package guix-patches. (Sat, 16 Dec 2023 20:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Troy Figiel <troy <at> troyfigiel.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 16 Dec 2023 20:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Troy Figiel <troy <at> troyfigiel.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: python-cookiecutter: Update to 2.5.0.
Date: Sat, 16 Dec 2023 14:23:48 +0100
* 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(-)

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")

base-commit: d5298c5e334e56a9aabddcb62d312e63135864f6
-- 
2.40.1





Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Fri, 22 Dec 2023 17:39:02 GMT) Full text and rfc822 format available.

Notification sent to Troy Figiel <troy <at> troyfigiel.com>:
bug acknowledged by developer. (Fri, 22 Dec 2023 17:39:03 GMT) Full text and rfc822 format available.

Message #10 received at 67855-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Troy Figiel <troy <at> troyfigiel.com>
Cc: 67855-done <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#67855] [PATCH] gnu: python-cookiecutter: Update to 2.5.0.
Date: Fri, 22 Dec 2023 17:38:31 +0000
[Message part 1 (text/plain, inline)]
Troy Figiel <troy <at> troyfigiel.com> writes:

> * 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(-)

Thanks for the patch, I've pushed it to master as
0de5677a1853dc8c4d74f239de8787d49fc77c94.

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#67855; Package guix-patches. (Fri, 22 Dec 2023 17:40:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 Jan 2024 12:24:16 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.