unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 0/4] Add flake8 and its dependencies.
@ 2015-06-26 22:58 Cyril Roelandt
  2015-06-26 22:58 ` [PATCH 1/4] gnu: Add python-pep8 Cyril Roelandt
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Cyril Roelandt @ 2015-06-26 22:58 UTC (permalink / raw)
  To: guix-devel

This patch series adds flake8, a tool commonly used by Python developers.

Cyril.
---

Cyril Roelandt (4):
  gnu: Add python-pep8.
  gnu: Add python-pyflakes.
  gnu: Add python-mccabe.
  gnu: Add python-flake8.

 gnu/packages/python.scm | 149 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 149 insertions(+)

-- 
1.8.4.rc3

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

* [PATCH 1/4] gnu: Add python-pep8.
  2015-06-26 22:58 [PATCH 0/4] Add flake8 and its dependencies Cyril Roelandt
@ 2015-06-26 22:58 ` Cyril Roelandt
  2015-06-29 12:02   ` Ludovic Courtès
  2015-06-26 22:58 ` [PATCH 2/4] gnu: Add python-pyflakes Cyril Roelandt
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Cyril Roelandt @ 2015-06-26 22:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-pep8, python2-pep8): New variables.
---
 gnu/packages/python.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 1b3934b..1079843 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3902,3 +3902,30 @@ applications.")
 
 (define-public python2-pyzmq
   (package-with-python2 python-pyzmq))
+
+(define-public python-pep8
+  (package
+    (name "python-pep8")
+    (version "1.6.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://pypi.python.org/packages/source/p/pep8/pep8-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32
+            "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
+    (build-system python-build-system)
+    (inputs
+      `(("python-setuptools" ,python-setuptools)))
+    (home-page "http://pep8.readthedocs.org/")
+    (synopsis "Python style guide checker")
+    (description
+     "A tool to check your Python code against some of the style conventions in
+PEP 8.")
+    (license license:expat)))
+
+(define-public python2-pep8
+  (package-with-python2 python-pep8))
-- 
1.8.4.rc3

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

* [PATCH 2/4] gnu: Add python-pyflakes.
  2015-06-26 22:58 [PATCH 0/4] Add flake8 and its dependencies Cyril Roelandt
  2015-06-26 22:58 ` [PATCH 1/4] gnu: Add python-pep8 Cyril Roelandt
@ 2015-06-26 22:58 ` Cyril Roelandt
  2015-06-29 12:03   ` Ludovic Courtès
  2015-06-26 22:58 ` [PATCH 3/4] gnu: Add python-mccabe Cyril Roelandt
  2015-06-26 22:58 ` [PATCH 4/4] gnu: Add python-flake8 Cyril Roelandt
  3 siblings, 1 reply; 9+ messages in thread
From: Cyril Roelandt @ 2015-06-26 22:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-pyflakes, python2-pyflakes): New variables.
---
 gnu/packages/python.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 1079843..12eabab 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3929,3 +3929,27 @@ PEP 8.")
 
 (define-public python2-pep8
   (package-with-python2 python-pep8))
+
+(define-public python-pyflakes
+  (package
+    (name "python-pyflakes")
+    (version "0.9.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32
+            "0pvawddspdq0y22dbraq5gld9qr6rwa7zhmpfhl2b7v9rqiiqs82"))))
+    (build-system python-build-system)
+    (inputs
+      `(("python-setuptools" ,python-setuptools)))
+    (home-page
+      "https://github.com/pyflakes/pyflakes")
+    (synopsis "Passive checker of Python programs")
+    (description
+      "A simple program which checks Python source files for errors.")
+    (license license:expat)))
-- 
1.8.4.rc3

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

* [PATCH 3/4] gnu: Add python-mccabe.
  2015-06-26 22:58 [PATCH 0/4] Add flake8 and its dependencies Cyril Roelandt
  2015-06-26 22:58 ` [PATCH 1/4] gnu: Add python-pep8 Cyril Roelandt
  2015-06-26 22:58 ` [PATCH 2/4] gnu: Add python-pyflakes Cyril Roelandt
@ 2015-06-26 22:58 ` Cyril Roelandt
  2015-06-29 12:04   ` Ludovic Courtès
  2015-06-26 22:58 ` [PATCH 4/4] gnu: Add python-flake8 Cyril Roelandt
  3 siblings, 1 reply; 9+ messages in thread
From: Cyril Roelandt @ 2015-06-26 22:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-mccabe, python2-mccabe): New variables.
---
 gnu/packages/python.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 12eabab..b35af55 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3953,3 +3953,28 @@ PEP 8.")
     (description
       "A simple program which checks Python source files for errors.")
     (license license:expat)))
+
+(define-public python-mccabe
+  (package
+    (name "python-mccabe")
+    (version "0.3.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32
+            "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
+    (build-system python-build-system)
+    (inputs
+      `(("python-setuptools" ,python-setuptools)))
+    (home-page "https://github.com/flintwork/mccabe")
+    (synopsis "McCabe checker, plugin for flake8")
+    (description "McCabe checker, plugin for flake8")
+    (license expat)))
+
+(define-public python2-mccabe
+  (package-with-python2 python-mccabe))
-- 
1.8.4.rc3

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

* [PATCH 4/4] gnu: Add python-flake8.
  2015-06-26 22:58 [PATCH 0/4] Add flake8 and its dependencies Cyril Roelandt
                   ` (2 preceding siblings ...)
  2015-06-26 22:58 ` [PATCH 3/4] gnu: Add python-mccabe Cyril Roelandt
@ 2015-06-26 22:58 ` Cyril Roelandt
  2015-06-29 12:07   ` Ludovic Courtès
  3 siblings, 1 reply; 9+ messages in thread
From: Cyril Roelandt @ 2015-06-26 22:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-flake8, python2-flake8): New variables.
---
 gnu/packages/python.scm | 73 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b35af55..47989f9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3978,3 +3978,76 @@ PEP 8.")
 
 (define-public python2-mccabe
   (package-with-python2 python-mccabe))
+
+;; Flake8 2.4.1 requires an older version of pep8.
+;; This should be removed ASAP.
+(define-public python-pep8-1.5.7
+  (package (inherit python-pep8)
+    (version "1.5.7")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://pypi.python.org/packages/source/p/pep8/pep8-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32
+            "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
+
+(define-public python2-pep8-1.5.7
+  (package-with-python2 python-pep8-1.5.7))
+
+;; Flake8 2.4.1 requires an older version of pyflakes.
+;; This should be removed ASAP.
+(define-public python-pyflakes-0.8.1
+  (package (inherit python-pyflakes)
+    (version "0.8.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32
+            "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
+
+(define-public python2-pyflakes-0.8.1
+  (package-with-python2 python-pyflakes))
+
+(define-public python-flake8
+  (package
+    (name "python-flake8")
+    (version "2.4.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://pypi.python.org/packages/source/f/flake8/flake8-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32
+            "0dvmrpv7x98xkzffjz1z7lqr90sp5zdz16bdwckfd1cckpjvnzif"))))
+    (build-system python-build-system)
+    (inputs
+      `(("python-setuptools" ,python-setuptools)
+        ("python-pep8" ,python-pep8-1.5.7)
+        ("python-pyflakes" ,python-pyflakes-0.8.1)
+        ("python-mccabe" ,python-mccabe)
+        ("python-mock" ,python-mock)
+        ("python-nose" ,python-nose)))
+    (home-page "https://gitlab.com/pycqa/flake8")
+    (synopsis
+      "The modular source code checker: pep8, pyflakes and co")
+    (description
+      "Flake8 is a wrapper around these tools:
+- PyFlakes;
+- pep8;
+- Ned Batchelder’s McCabe script.")
+    (license license:expat)))
+
+(define-public python2-flake8
+  (package-with-python2 python-flake8))
-- 
1.8.4.rc3

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

* Re: [PATCH 1/4] gnu: Add python-pep8.
  2015-06-26 22:58 ` [PATCH 1/4] gnu: Add python-pep8 Cyril Roelandt
@ 2015-06-29 12:02   ` Ludovic Courtès
  0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2015-06-29 12:02 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> * gnu/packages/python.scm (python-pep8, python2-pep8): New variables.

[...]

> +    (synopsis "Python style guide checker")
> +    (description
> +     "A tool to check your Python code against some of the style conventions in
> +PEP 8.")

Rather make it a sentence: “This tool checks Python code ...”.

OK with this change, thanks!

Ludo’.

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

* Re: [PATCH 2/4] gnu: Add python-pyflakes.
  2015-06-26 22:58 ` [PATCH 2/4] gnu: Add python-pyflakes Cyril Roelandt
@ 2015-06-29 12:03   ` Ludovic Courtès
  0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2015-06-29 12:03 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> * gnu/packages/python.scm (python-pyflakes, python2-pyflakes): New variables.

[...]

> +    (description
> +      "A simple program which checks Python source files for errors.")

Rather: “PyFlakes statically checks Python source code for common
errors, such as FOO and BAR.”

OK with a change along these lines.

Thanks,
Ludo’.

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

* Re: [PATCH 3/4] gnu: Add python-mccabe.
  2015-06-26 22:58 ` [PATCH 3/4] gnu: Add python-mccabe Cyril Roelandt
@ 2015-06-29 12:04   ` Ludovic Courtès
  0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2015-06-29 12:04 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> * gnu/packages/python.scm (python-mccabe, python2-mccabe): New variables.

[...]

> +    (description "McCabe checker, plugin for flake8")

I’m just guessing, but rather something like: “This package provides a
Flake8 plug-in to compute the McCabe cyclomatic complexity of Python
source code.”

OK with such a change.

Thanks,
Ludo’.

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

* Re: [PATCH 4/4] gnu: Add python-flake8.
  2015-06-26 22:58 ` [PATCH 4/4] gnu: Add python-flake8 Cyril Roelandt
@ 2015-06-29 12:07   ` Ludovic Courtès
  0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2015-06-29 12:07 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> * gnu/packages/python.scm (python-flake8, python2-flake8): New variables.

[...]

> +    (synopsis
> +      "The modular source code checker: pep8, pyflakes and co")

Rather: “Modular Python source code analysis tool”?

> +    (description
> +      "Flake8 is a wrapper around these tools:
> +- PyFlakes;
> +- pep8;
> +- Ned Batchelder’s McCabe script.")

Don’t write a bullet list since it’s formatting would be lost in the
various UIs.

OK with these changes.

Thank you!

Ludo’.

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

end of thread, other threads:[~2015-06-29 12:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-26 22:58 [PATCH 0/4] Add flake8 and its dependencies Cyril Roelandt
2015-06-26 22:58 ` [PATCH 1/4] gnu: Add python-pep8 Cyril Roelandt
2015-06-29 12:02   ` Ludovic Courtès
2015-06-26 22:58 ` [PATCH 2/4] gnu: Add python-pyflakes Cyril Roelandt
2015-06-29 12:03   ` Ludovic Courtès
2015-06-26 22:58 ` [PATCH 3/4] gnu: Add python-mccabe Cyril Roelandt
2015-06-29 12:04   ` Ludovic Courtès
2015-06-26 22:58 ` [PATCH 4/4] gnu: Add python-flake8 Cyril Roelandt
2015-06-29 12:07   ` Ludovic Courtès

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