all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#55693] [PATCH 0/2] gnu: Add gitlint.
@ 2022-05-28 23:53 Brian Kubisiak
  2022-05-28 23:55 ` [bug#55693] [PATCH 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Brian Kubisiak @ 2022-05-28 23:53 UTC (permalink / raw)
  To: 55693

Brian Kubisiak (2):
      gnu: python-sh: Update to 1.14.2.
      gnu: Add gitlint.

gnu/packages/python-xyz.scm      |  4 ++--
gnu/packages/version-control.scm | 26 ++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 2 deletions(-)





^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH 1/2] gnu: python-sh: Update to 1.14.2.
  2022-05-28 23:53 [bug#55693] [PATCH 0/2] gnu: Add gitlint Brian Kubisiak
@ 2022-05-28 23:55 ` Brian Kubisiak
  2022-05-28 23:55 ` [bug#55693] [PATCH 2/2] gnu: Add gitlint Brian Kubisiak
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Brian Kubisiak @ 2022-05-28 23:55 UTC (permalink / raw)
  To: 55693

* gnu/packages/python-xyz.scm (python-sh): Update to 1.14.2.
---
 gnu/packages/python-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 156d318944..222485ef6c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1612,14 +1612,14 @@ (define-public python-pyls-black
 (define-public python-sh
   (package
     (name "python-sh")
-    (version "1.12.14")
+    (version "1.14.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "sh" version))
        (sha256
         (base32
-         "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
+         "03gyss1rhj4in7pgysg4q0hxp3230whinlpy1532ljs99lrx0ywx"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
-- 
2.36.1






^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH 2/2] gnu: Add gitlint.
  2022-05-28 23:53 [bug#55693] [PATCH 0/2] gnu: Add gitlint Brian Kubisiak
  2022-05-28 23:55 ` [bug#55693] [PATCH 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
@ 2022-05-28 23:55 ` Brian Kubisiak
  2022-05-29 10:51   ` Maxime Devos
  2022-05-30 23:17 ` [bug#55693] [PATCH v2 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Brian Kubisiak @ 2022-05-28 23:55 UTC (permalink / raw)
  To: 55693

* gnu/packages/version-control.scm (gitlint): New variable.
---
 gnu/packages/version-control.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9d0786d2d9..a4766d5853 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -3371,3 +3371,29 @@ (define-public git-filter-repo
 Git project instead of @command{git filter-branch}.")
     (license (list license:expat ;; Main license.
                    license:gpl2)))) ;; For test harness.
+
+(define-public gitlint
+  (package
+    (name "gitlint")
+    (version "0.17.0")
+    (source (origin
+              (method url-fetch)
+              ;; the gitlint-core pypi package contains the actual gitlint
+              ;; code; the gitlint package only pulls in gitlint-core with
+              ;; stricter dependency versioning
+              (uri (pypi-uri "gitlint-core" version))
+              (sha256
+               (base32
+                "14cn89biys8r7mwcdgllv371k34km9k1941ylxf53a7sxwrzsbbp"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-arrow" ,python-arrow)
+       ("python-click" ,python-click)
+       ("python-sh" ,python-sh)))
+    (propagated-inputs (list git))
+    (home-page "https://jorisroovers.com/gitlint/")
+    (synopsis "Linting for your git commit messages")
+    (description
+     "Gitlint is a git commit message linter written in python: it checks your
+commit messages for style.")
+    (license license:expat)))
-- 
2.36.1






^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH 2/2] gnu: Add gitlint.
  2022-05-28 23:55 ` [bug#55693] [PATCH 2/2] gnu: Add gitlint Brian Kubisiak
@ 2022-05-29 10:51   ` Maxime Devos
  2022-05-29 21:37     ` Brian Kubisiak
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Devos @ 2022-05-29 10:51 UTC (permalink / raw)
  To: Brian Kubisiak, 55693

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

Brian Kubisiak schreef op za 28-05-2022 om 16:55 [-0700]:
> +    (propagated-inputs (list git))

Propagtion is not required, a regular input + substitute* 'git' by
(search-input-file inputs "bin/git") in  gitlint-core/gitlint/shell.py
should be sufficient.

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH 2/2] gnu: Add gitlint.
  2022-05-29 10:51   ` Maxime Devos
@ 2022-05-29 21:37     ` Brian Kubisiak
  2022-05-29 21:43       ` Maxime Devos
  0 siblings, 1 reply; 13+ messages in thread
From: Brian Kubisiak @ 2022-05-29 21:37 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 55693

> > +    (propagated-inputs (list git))
>
> Propagtion is not required, a regular input + substitute* 'git' by
> (search-input-file inputs "bin/git") in  gitlint-core/gitlint/shell.py
> should be sufficient.

shell.py only uses the 'subprocess' code path on windows (or if the
GITLINT_USE_SH_LIB environment variable is set, for testing). On
linux, git is called through 'from sh import git' (through the
python-sh library), which will look for git on $PATH and requires this
to be a propagated input.

Thanks,
Brian





^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH 2/2] gnu: Add gitlint.
  2022-05-29 21:37     ` Brian Kubisiak
@ 2022-05-29 21:43       ` Maxime Devos
  0 siblings, 0 replies; 13+ messages in thread
From: Maxime Devos @ 2022-05-29 21:43 UTC (permalink / raw)
  To: Brian Kubisiak; +Cc: 55693

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

Brian Kubisiak schreef op zo 29-05-2022 om 14:37 [-0700]:
> > > +    (propagated-inputs (list git))
> > 
> > Propagtion is not required, a regular input + substitute* 'git' by
> > (search-input-file inputs "bin/git") in  gitlint-
> > core/gitlint/shell.py
> > should be sufficient.
> 
> shell.py only uses the 'subprocess' code path on windows (or if the
> GITLINT_USE_SH_LIB environment variable is set, for testing). On
> linux, git is called through 'from sh import git' (through the
> python-sh library), which will look for git on $PATH and requires
> this to be a propagated input.

Then we can patch python-sh or disable GITLINT_USE_SH_LIB instead, to
avoid propagation.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH v2 1/2] gnu: python-sh: Update to 1.14.2.
  2022-05-28 23:53 [bug#55693] [PATCH 0/2] gnu: Add gitlint Brian Kubisiak
  2022-05-28 23:55 ` [bug#55693] [PATCH 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
  2022-05-28 23:55 ` [bug#55693] [PATCH 2/2] gnu: Add gitlint Brian Kubisiak
@ 2022-05-30 23:17 ` Brian Kubisiak
  2022-05-30 23:17 ` [bug#55693] [PATCH v2 2/2] gnu: Add gitlint Brian Kubisiak
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Brian Kubisiak @ 2022-05-30 23:17 UTC (permalink / raw)
  To: 55693

* gnu/packages/python-xyz.scm (python-sh): Update to 1.14.2.
---
 gnu/packages/python-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 156d318944..222485ef6c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1612,14 +1612,14 @@ (define-public python-pyls-black
 (define-public python-sh
   (package
     (name "python-sh")
-    (version "1.12.14")
+    (version "1.14.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "sh" version))
        (sha256
         (base32
-         "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
+         "03gyss1rhj4in7pgysg4q0hxp3230whinlpy1532ljs99lrx0ywx"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
-- 
2.36.1






^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH v2 2/2] gnu: Add gitlint.
  2022-05-28 23:53 [bug#55693] [PATCH 0/2] gnu: Add gitlint Brian Kubisiak
                   ` (2 preceding siblings ...)
  2022-05-30 23:17 ` [bug#55693] [PATCH v2 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
@ 2022-05-30 23:17 ` Brian Kubisiak
  2022-06-01 23:04   ` Maxime Devos
  2022-06-02  1:56 ` [bug#55693] [PATCH v3 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
  2022-06-02  1:56 ` [bug#55693] [PATCH v3 2/2] " Brian Kubisiak
  5 siblings, 1 reply; 13+ messages in thread
From: Brian Kubisiak @ 2022-05-30 23:17 UTC (permalink / raw)
  To: 55693

* gnu/packages/version-control.scm (gitlint): New variable.
---
 gnu/packages/version-control.scm | 39 ++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9d0786d2d9..abc93ecd8e 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -3371,3 +3371,42 @@ (define-public git-filter-repo
 Git project instead of @command{git filter-branch}.")
     (license (list license:expat ;; Main license.
                    license:gpl2)))) ;; For test harness.
+
+(define-public gitlint
+  (package
+    (name "gitlint")
+    (version "0.17.0")
+    (source (origin
+              (method url-fetch)
+              ;; the gitlint-core pypi package contains the actual gitlint
+              ;; code; the gitlint package only pulls in gitlint-core with
+              ;; stricter dependency versioning
+              (uri (pypi-uri "gitlint-core" version))
+              (sha256
+               (base32
+                "14cn89biys8r7mwcdgllv371k34km9k1941ylxf53a7sxwrzsbbp"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'loosen-requirements
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "gitlint/shell.py"
+               (("'git'") (string-append "'"
+                                         (search-input-file inputs "bin/git")
+                                         "'"))
+               ;; force using subprocess instead of sh so git does not need to
+               ;; be a propagated input
+               (("if USE_SH_LIB") "if False"))
+             #t)))))
+    (inputs
+     `(("git" ,git)
+       ("python-arrow" ,python-arrow)
+       ("python-click" ,python-click)
+       ("python-sh" ,python-sh)))
+    (home-page "https://jorisroovers.com/gitlint/")
+    (synopsis "Linting for your git commit messages")
+    (description
+     "Gitlint is a git commit message linter written in python: it checks your
+commit messages for style.")
+    (license license:expat)))
-- 
2.36.1






^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH v2 2/2] gnu: Add gitlint.
  2022-05-30 23:17 ` [bug#55693] [PATCH v2 2/2] gnu: Add gitlint Brian Kubisiak
@ 2022-06-01 23:04   ` Maxime Devos
  2022-06-05 21:19     ` [bug#55693] [PATCH 0/2] " Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Devos @ 2022-06-01 23:04 UTC (permalink / raw)
  To: Brian Kubisiak, 55693

[-- Attachment #1: Type: text/plain, Size: 954 bytes --]

Brian Kubisiak schreef op ma 30-05-2022 om 16:17 [-0700]:
> +             #t)))))

Trailing #t aren't required anymore since a long time, it can be
removed.

> +    (inputs
> +     `(("git" ,git)
> +       ("python-arrow" ,python-arrow)
> +       ("python-click" ,python-click)
> +       ("python-sh" ,python-sh)))

Input labels aren't required anymore.  Try running "guix style -S
inputs".  Also, IIUC, Hartmut Goebel would prefer not using quasiquote
(`):

  (arguments
    (list #:phases
          #~(modify-phases [stuff]
              [stuff]
              ...)))

to avoid the complicated quasiquote/unquote construct, with which I
agree though it's AFAIK not (yet?) elevated to ‘official Guix style’ or
such.

Otherwise LGTM, though I haven't looked at most of the source code of
gitlint (for malware or such) or in detail at the description and
synopsis (for clarity and such).

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH v3 1/2] gnu: python-sh: Update to 1.14.2.
  2022-05-28 23:53 [bug#55693] [PATCH 0/2] gnu: Add gitlint Brian Kubisiak
                   ` (3 preceding siblings ...)
  2022-05-30 23:17 ` [bug#55693] [PATCH v2 2/2] gnu: Add gitlint Brian Kubisiak
@ 2022-06-02  1:56 ` Brian Kubisiak
  2022-06-05 21:25   ` bug#55693: [PATCH 0/2] gnu: Add gitlint Ludovic Courtès
  2022-06-02  1:56 ` [bug#55693] [PATCH v3 2/2] " Brian Kubisiak
  5 siblings, 1 reply; 13+ messages in thread
From: Brian Kubisiak @ 2022-06-02  1:56 UTC (permalink / raw)
  To: 55693

* gnu/packages/python-xyz.scm (python-sh): Update to 1.14.2.
---
 gnu/packages/python-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 156d318944..222485ef6c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1612,14 +1612,14 @@ (define-public python-pyls-black
 (define-public python-sh
   (package
     (name "python-sh")
-    (version "1.12.14")
+    (version "1.14.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "sh" version))
        (sha256
         (base32
-         "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
+         "03gyss1rhj4in7pgysg4q0hxp3230whinlpy1532ljs99lrx0ywx"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
-- 
2.36.1






^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH v3 2/2] gnu: Add gitlint.
  2022-05-28 23:53 [bug#55693] [PATCH 0/2] gnu: Add gitlint Brian Kubisiak
                   ` (4 preceding siblings ...)
  2022-06-02  1:56 ` [bug#55693] [PATCH v3 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
@ 2022-06-02  1:56 ` Brian Kubisiak
  5 siblings, 0 replies; 13+ messages in thread
From: Brian Kubisiak @ 2022-06-02  1:56 UTC (permalink / raw)
  To: 55693

* gnu/packages/version-control.scm (gitlint): New variable.
---
 gnu/packages/version-control.scm | 37 ++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9d0786d2d9..e8a356df62 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -3371,3 +3371,40 @@ (define-public git-filter-repo
 Git project instead of @command{git filter-branch}.")
     (license (list license:expat ;; Main license.
                    license:gpl2)))) ;; For test harness.
+
+(define-public gitlint
+  (package
+    (name "gitlint")
+    (version "0.17.0")
+    (source (origin
+              (method url-fetch)
+              ;; the gitlint-core pypi package contains the actual gitlint
+              ;; code; the gitlint package only pulls in gitlint-core with
+              ;; stricter dependency versioning
+              (uri (pypi-uri "gitlint-core" version))
+              (sha256
+               (base32
+                "14cn89biys8r7mwcdgllv371k34km9k1941ylxf53a7sxwrzsbbp"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'loosen-requirements
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "gitlint/shell.py"
+                (("'git'") (string-append
+                            "'"
+                            (search-input-file inputs "bin/git")
+                            "'"))
+                ;; force using subprocess instead of sh so git does not need
+                ;; to be a propagated input
+                (("if USE_SH_LIB") "if False")))))))
+    (inputs
+     (list git python-arrow python-click python-sh))
+    (home-page "https://jorisroovers.com/gitlint/")
+    (synopsis "Linting for your git commit messages")
+    (description
+     "Gitlint is a git commit message linter written in python: it checks your
+commit messages for style.")
+    (license license:expat)))
-- 
2.36.1






^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#55693] [PATCH 0/2] gnu: Add gitlint.
  2022-06-01 23:04   ` Maxime Devos
@ 2022-06-05 21:19     ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2022-06-05 21:19 UTC (permalink / raw)
  To: Maxime Devos; +Cc: Brian Kubisiak, 55693

Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> Input labels aren't required anymore.  Try running "guix style -S
> inputs".  Also, IIUC, Hartmut Goebel would prefer not using quasiquote
> (`):
>
>   (arguments
>     (list #:phases
>           #~(modify-phases [stuff]
>               [stuff]
>               ...)))
>
> to avoid the complicated quasiquote/unquote construct, with which I
> agree though it's AFAIK not (yet?) elevated to ‘official Guix style’ or
> such.

I too prefer:

  (list #:foo #~(…))

over:

  `(#:foo ,#~(…))

Otherwise that’s too much line noise IMO, especially for a newcomer.

Ludo’.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55693: [PATCH 0/2] gnu: Add gitlint.
  2022-06-02  1:56 ` [bug#55693] [PATCH v3 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
@ 2022-06-05 21:25   ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2022-06-05 21:25 UTC (permalink / raw)
  To: Brian Kubisiak; +Cc: 55693-done

Hi,

Brian Kubisiak <brian@kubisiak.com> skribis:

> * gnu/packages/python-xyz.scm (python-sh): Update to 1.14.2.

[...]

> * gnu/packages/version-control.scm (gitlint): New variable.

Applied both.

> +    (synopsis "Linting for your git commit messages")
> +    (description
> +     "Gitlint is a git commit message linter written in python: it checks your
> +commit messages for style.")

I capitalized proper nouns here.

Thank you and thanks Maxime!

Ludo’.




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-06-05 21:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-28 23:53 [bug#55693] [PATCH 0/2] gnu: Add gitlint Brian Kubisiak
2022-05-28 23:55 ` [bug#55693] [PATCH 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
2022-05-28 23:55 ` [bug#55693] [PATCH 2/2] gnu: Add gitlint Brian Kubisiak
2022-05-29 10:51   ` Maxime Devos
2022-05-29 21:37     ` Brian Kubisiak
2022-05-29 21:43       ` Maxime Devos
2022-05-30 23:17 ` [bug#55693] [PATCH v2 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
2022-05-30 23:17 ` [bug#55693] [PATCH v2 2/2] gnu: Add gitlint Brian Kubisiak
2022-06-01 23:04   ` Maxime Devos
2022-06-05 21:19     ` [bug#55693] [PATCH 0/2] " Ludovic Courtès
2022-06-02  1:56 ` [bug#55693] [PATCH v3 1/2] gnu: python-sh: Update to 1.14.2 Brian Kubisiak
2022-06-05 21:25   ` bug#55693: [PATCH 0/2] gnu: Add gitlint Ludovic Courtès
2022-06-02  1:56 ` [bug#55693] [PATCH v3 2/2] " Brian Kubisiak

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.