From: phodina via Guix-patches via <guix-patches@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 49575@debbugs.gnu.org
Subject: [bug#49575] [PATCH v3] gnu: Add python-date2name.
Date: Tue, 31 Aug 2021 11:15:16 +0000 [thread overview]
Message-ID: <jXuaR7JLE6v4xhYiCx1TnXMFI34PQz8jNqQe1-MbXLa6MIpeh4BOooyHVJVjCR7R--ZrP-hGM1pd89qEPVodWwfq-GEV--tuN7CncDO7JA0=@protonmail.com> (raw)
In-Reply-To: <YNMAEZWdRC39gDCVHBz_cniWC4i4jHHBfWyp8ELtjLIS108av5r4134bqogTVLaI-9SUoE2FIiF4yufNclwGj-r_T_Sj5ZdNZVxzAP_m-U4=@protonmail.com>
Hi Ludo,
thanks for the suggestions and excellent documentation! Here's the updated patch.
-------------------------------------
* gnu/packages/python-check.scm (date2name): New variable.
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 2a4f50ad46..afd5cb5cb9 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -905,6 +906,42 @@ for the @code{pytest} framework.")
rounds that are calibrated to the chosen timer.")
(license license:bsd-2)))
+(define-public python-date2name
+ (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
+ (revision "1"))
+ (package
+ (name "python-date2name")
+ (version (git-version "" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/novoid/date2name")
+ (commit version)))
+ (file-name (git-file-name name 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 "By default, date2name gets the modification time of matching
+files and directories and adds a datestamp in standard ISO 8601+ format
+YYYY-MM-DD at the beginning of the file or directory name.")
+ (home-page "https://github.com/novoid/date2name")
+ (license license:gpl3+))))
+
(define-public python-pytest-xvfb
(package
(name "python-pytest-xvfb")
--
2.32.0
next prev parent reply other threads:[~2021-08-31 11:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-15 16:05 [bug#49575] [PATCH] Add date2name phodina via Guix-patches via
2021-07-18 10:24 ` phodina via Guix-patches via
2021-07-29 19:43 ` Ludovic Courtès
2021-08-31 11:15 ` phodina via Guix-patches via [this message]
2021-09-01 21:04 ` bug#49575: [PATCH v3] gnu: Add python-date2name Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jXuaR7JLE6v4xhYiCx1TnXMFI34PQz8jNqQe1-MbXLa6MIpeh4BOooyHVJVjCR7R--ZrP-hGM1pd89qEPVodWwfq-GEV--tuN7CncDO7JA0=@protonmail.com' \
--to=guix-patches@gnu.org \
--cc=49575@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=phodina@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).