diff mbox series

[bug#49575] Add date2name

Message ID gHjvOIOOkGRdbmGmB40mbTNr9jRjJGH8UJ7ggEOhHRmmQJUa67jCdVc6AhXD8iPlArcId65nCpiwgXelarQBjooRtxokmKDnh3Ej5vWcg3w=@protonmail.com
State Accepted
Headers show
Series [bug#49575] Add date2name | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

phodina July 18, 2021, 10:24 a.m. UTC
Here's updated patch with following changes:
- removed trailing whitespace
- add comment for git commit
- add comment for no tests
- lines have less than 80 chars

---
index 2a4f50ad46..220ac39e1d 100644
--
2.31.1

Comments

Ludovic Courtès July 29, 2021, 7:43 p.m. UTC | #1
Hi phodina,

phodina <phodina@protonmail.com> skribis:

> Here's updated patch with following changes:
> - removed trailing whitespace
> - add comment for git commit
> - add comment for no tests
> - lines have less than 80 chars

Thanks for your patch!  Overall it looks like it’s almost ready.  Here
are suggestions to complete it:

> +(define-public python-date2name
> +(package
> +  (name "date2name")

This should be indented; please check the indentation of the packages
around, and consider running ./etc/indent-code.el as mentioned at:

  https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html

> +  (version "6c8f37277e8ec82aa50f90b8921422be30c4e798") ; no tags

Please check
<https://guix.gnu.org/manual/en/html_node/Version-Numbers.html> for how
to choose version numbers.

> +  (source (origin
> +            (method git-fetch)
> +            (uri (git-reference
> +                  (url "https://github.com/novoid/date2name")
> +                  (commit version)))
> +            (sha256
> +             (base32
> +              "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7"))))

‘guix lint’ would probably warn you about the file name of the checkout;
you can add a ‘file-name’ field to the origin to fix that.

> +  (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

s/Per/By/

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

s/file-/file/ and s/directoryname/directory name/

Please use @uref for the URL (Texinfo markup).

> +  (home-page "https://github.com/novoid/date2name")
> +  (license license:gpl3)))

This should be ‘license:gpl3+’ because nothing in the code says “version
3 only”.

Could you send an updated patch?

Thank you!

Ludo’.
diff mbox series

Patch

--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -905,6 +905,40 @@  for the @code{pytest} framework.")
 rounds that are calibrated to the chosen timer.")
     (license license:bsd-2)))

+
+(define-public python-date2name
+(package
+  (name "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")