diff mbox

[1/3] gnu: Add python-pytest-pep8.

Message ID 20160911140737.24248-1-mbakke@fastmail.com
State New
Headers show

Commit Message

Marius Bakke Sept. 11, 2016, 2:07 p.m. UTC
* gnu/packages/python.scm (python-pytest-pep8, python2-pytest-pep8): New
  variables.
---
 gnu/packages/python.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

Comments

Leo Famulari Sept. 14, 2016, 9:41 p.m. UTC | #1
On Sun, Sep 11, 2016 at 03:07:35PM +0100, Marius Bakke wrote:
> * gnu/packages/python.scm (python-pytest-pep8, python2-pytest-pep8): New
>   variables.

Overall LGTM...

> +    (description "Pytest plugin for efficiently checking PEP8 compliance")

I think we can drop "efficiently". I can do that before committing if
you agree; no need to send an updated patch.
Marius Bakke Sept. 14, 2016, 10:39 p.m. UTC | #2
Leo Famulari <leo@famulari.name> writes:

> On Sun, Sep 11, 2016 at 03:07:35PM +0100, Marius Bakke wrote:
>> * gnu/packages/python.scm (python-pytest-pep8, python2-pytest-pep8): New
>>   variables.
>
> Overall LGTM...
>
>> +    (description "Pytest plugin for efficiently checking PEP8 compliance")
>
> I think we can drop "efficiently". I can do that before committing if
> you agree; no need to send an updated patch.

Thanks! Please do that for both the pep8 and flakes pytest plugins.
diff mbox

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 8b9273c..21eda38 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10327,3 +10327,36 @@  Python to manipulate OpenDocument 1.2 files.")
              (native-inputs
               `(("python2-setuptools" ,python2-setuptools)
                 ,@(package-native-inputs base))))))
+
+(define-public python-pytest-pep8
+  (package
+    (name "python-pytest-pep8")
+    (version "1.0.6")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pytest-pep8" version))
+              (sha256
+               (base32
+                "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
+       ;; Prevent creation of the egg. This works around
+       ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
+       #:configure-flags '("--single-version-externally-managed" "--root=/")))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-pep8" ,python-pep8)))
+    (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
+    (synopsis "Py.test plugin to check PEP8 requirements")
+    (description "Pytest plugin for efficiently checking PEP8 compliance")
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
+
+(define-public python2-pytest-pep8
+  (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
+    (package (inherit base)
+             (native-inputs
+              `(("python2-setuptools" ,python2-setuptools)
+                ,@(package-native-inputs base))))))