Subject: bug#49735: closed (Re: [PATCH v3] gnu: Add python-date2name.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 01 Sep 2021 21:06:02 +0000

Your bug report

#49575: [PATCH v2] gnu: Add python-date2name.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
49575: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49575
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [PATCH v3] gnu: Add python-date2name.
From: Ludovic Courtès <[email-masked]>
To: phodina <[email-masked]>
Cc: [email-masked]
Date: Wed, 01 Sep 2021 23:04:58 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

phodina <[email-masked]> skribis:

> Hi Ludo,
>
> thanks for the suggestions and excellent documentation! Here's the updated patch.
> -------------------------------------
>
> * gnu/packages/python-check.scm (date2name): New variable.

I applied it with a couple of changes I forgot to suggest earlier:
moving it to python-xyz.scm (python-check.scm is for tools related to
test suites), renaming it to “date2name” since it’s a command-line tool
and not a Python library, and having the ‘commit’ field of
‘git-reference’ refer to the commit, not the version number.

Thanks!

Ludo’.

Subject: Re: [PATCH v2] gnu: Add python-date2name.
From: phodina <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Sun, 25 Jul 2021 19:04:22 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/python-check.scm (date2name): New variable.
---
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 2a4f50ad46..c5b50da774 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2021 Brendan Tildesley <[email-masked]>
 ;;; Copyright © 2021 Guillaume Le Vaillant <[email-masked]>
 ;;; Copyright © 2021 Bonface Munyoki Kilyungi <[email-masked]>
+;;; Copyright © 2021 Petr Hodina <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -905,6 +906,40 @@ for the @code{pytest} framework.")
 rounds that are calibrated to the chosen timer.")
     (license license:bsd-2)))

+
+(define-public python-date2name
+(package
+  (name "pyton-date2name")
+  (version "6c8f37277e8ec82aa50f90b8921422be30c4e798") ; no tags
+  (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/novoid/date2name")
+                  (commit version)))
+            (sha256
+             (base32
+              "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7"))))
+  (build-system python-build-system)
+  (arguments
+    `(#:tests? #f ; no tests
+      #:phases
+      (modify-phases %standard-phases
+       (delete 'build)
+       (replace 'install
+        (lambda* (#:key outputs #:allow-other-keys)
+         (let* ((bindir (string-append (assoc-ref outputs "out") "/bin"))
+                (binary (string-append bindir "/date2name")))
+          (mkdir-p bindir)
+          (copy-file "date2name/__init__.py" binary)
+          (chmod binary #o555)))))))
+  (synopsis "Handling time-stamps and date-stamps in file names")
+  (description "Per default, date2name gets the modification time of matching
+files and directories and adds a datestamp in standard ISO 8601+ format
+YYYY-MM-DD (http://datestamps.org/index.shtml) at the beginning of the file-
+or directoryname.")
+  (home-page "https://github.com/novoid/date2name")
+  (license license:gpl3)))
+
 (define-public python-pytest-xvfb
   (package
     (name "python-pytest-xvfb")
--
2.31.1