emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49575: closed ([PATCH] Add date2name)


From: GNU bug Tracking System
Subject: bug#49575: closed ([PATCH] Add date2name)
Date: Wed, 01 Sep 2021 21:06:02 +0000

Your message dated Wed, 01 Sep 2021 23:04:58 +0200
with message-id <87fsuo6m85.fsf@gnu.org>
and subject line Re: [PATCH v3] gnu: Add python-date2name.
has caused the debbugs.gnu.org bug report #49575,
regarding [PATCH] Add date2name
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
49575: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49575
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] Add date2name Date: Thu, 15 Jul 2021 16:05:13 +0000
---
index d8c3fbec07..ac9a5f940d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -105,6 +105,7 @@
 ;;; Copyright © 2021 Danial Behzadi <dani.behzi@ubuntu.com>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -904,6 +905,37 @@ iotop, uptime, pidof, tty, taskset, pmap.")
     (properties `((python2-variant . ,(delay python2-psutil))))
     (license license:bsd-3)))

+(define-public python-date2name
+(package
+  (name "date2name")
+  (version "6c8f37277e8ec82aa50f90b8921422be30c4e798")
+  (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
+      #: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 python2-psutil
   (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
     (package/inherit base
--
2.31.1



--- End Message ---
--- Begin Message --- Subject: Re: [PATCH v3] gnu: Add python-date2name. Date: Wed, 01 Sep 2021 23:04:58 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hello,

phodina <phodina@protonmail.com> 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’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]