Patchwork [1/6] gnu: Add python-pycodestyle.

login
register
mail settings
Submitter Danny Milosavljevic
Date Nov. 5, 2016, 11:27 a.m.
Message ID <20161105112706.12089-2-dannym@scratchpost.org>
Download mbox | patch
Permalink /patch/17215/
State New
Headers show

Comments

Danny Milosavljevic - Nov. 5, 2016, 11:27 a.m.
* gnu/packages/python.scm (python-pycodestyle, python2-pycodestyle):
  New variables.
---
 gnu/packages/python.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
Marius Bakke - Nov. 5, 2016, 3:39 p.m.
Danny Milosavljevic <dannym@scratchpost.org> writes:

> * gnu/packages/python.scm (python-pycodestyle, python2-pycodestyle):
>   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 518ab3a..cb314e2 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -3829,6 +3829,33 @@ simple and Pythonic domain language.")
>  (define-public python2-sqlalchemy
>    (package-with-python2 python-sqlalchemy))
>  
> +(define-public python-pycodestyle
> +  (package
> +    (name "python-pycodestyle")
> +    (version "2.0.0")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (pypi-uri "pycodestyle" version))
> +        (sha256
> +          (base32
> +            "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
> +    (build-system python-build-system)
> +    (home-page "https://pycodestyle.readthedocs.io/")
> +    (synopsis "Python style guide checker")
> +    (description "pycodestyle (formerly pep8) is a tool to check your Python code against
                     ^^^
                     Either capitalize or wrap it in @code{} here.
> +some of the style conventions in @url{http://www.python.org/dev/peps/pep-0008/ PEP 8}.")

I think the @url syntax takes a comma rather than a space.

Otherwise LGTM.

> +    (license license:expat)
> +    (properties `((python2-variant . ,(delay python2-pycodestyle))))))
> +
> +(define-public python2-pycodestyle
> +  (let ((base (package-with-python2 (strip-python2-variant
> +                                     python-pycodestyle))))
> +    (package (inherit base)
> +      (native-inputs
> +       `(("python2-setuptools" ,python2-setuptools)
> +         ,@(package-native-inputs base))))))
> +
>  (define-public python-sqlalchemy-utils
>    (package
>      (name "python-sqlalchemy-utils")
Efraim Flashner - Nov. 5, 2016, 7:48 p.m.
On Sat, Nov 05, 2016 at 12:27:01PM +0100, Danny Milosavljevic wrote:
> * gnu/packages/python.scm (python-pycodestyle, python2-pycodestyle):
>   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 518ab3a..cb314e2 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -3829,6 +3829,33 @@ simple and Pythonic domain language.")
>  (define-public python2-sqlalchemy
>    (package-with-python2 python-sqlalchemy))
>  
> +(define-public python-pycodestyle
> +  (package
> +    (name "python-pycodestyle")
> +    (version "2.0.0")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (pypi-uri "pycodestyle" version))
> +        (sha256
> +          (base32
> +            "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
> +    (build-system python-build-system)
> +    (home-page "https://pycodestyle.readthedocs.io/")
> +    (synopsis "Python style guide checker")
> +    (description "pycodestyle (formerly pep8) is a tool to check your Python code against
> +some of the style conventions in @url{http://www.python.org/dev/peps/pep-0008/ PEP 8}.")
> +    (license license:expat)
> +    (properties `((python2-variant . ,(delay python2-pycodestyle))))))
> +
> +(define-public python2-pycodestyle
> +  (let ((base (package-with-python2 (strip-python2-variant
> +                                     python-pycodestyle))))
> +    (package (inherit base)
> +      (native-inputs
> +       `(("python2-setuptools" ,python2-setuptools)
> +         ,@(package-native-inputs base))))))
> +
>  (define-public python-sqlalchemy-utils
>    (package
>      (name "python-sqlalchemy-utils")
> 

Does this package supercede pep8? `guix import pypi pep8' gave me 1.7.0,
so we should switch it out if that's the case
Danny Milosavljevic - Nov. 5, 2016, 11:52 p.m.
Hi,

> Does this package supercede pep8? `guix import pypi pep8' gave me 1.7.0,
> so we should switch it out if that's the case

The request (by Guido van Rossum) can be found at <https://github.com/PyCQA/pycodestyle/issues/466>. So yes, it does.

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 518ab3a..cb314e2 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3829,6 +3829,33 @@  simple and Pythonic domain language.")
 (define-public python2-sqlalchemy
   (package-with-python2 python-sqlalchemy))
 
+(define-public python-pycodestyle
+  (package
+    (name "python-pycodestyle")
+    (version "2.0.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "pycodestyle" version))
+        (sha256
+          (base32
+            "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
+    (build-system python-build-system)
+    (home-page "https://pycodestyle.readthedocs.io/")
+    (synopsis "Python style guide checker")
+    (description "pycodestyle (formerly pep8) is a tool to check your Python code against
+some of the style conventions in @url{http://www.python.org/dev/peps/pep-0008/ PEP 8}.")
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-pycodestyle))))))
+
+(define-public python2-pycodestyle
+  (let ((base (package-with-python2 (strip-python2-variant
+                                     python-pycodestyle))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
 (define-public python-sqlalchemy-utils
   (package
     (name "python-sqlalchemy-utils")