guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 04/10] gnu: Add python-pytest-flakes.


From: Ben Woodcroft
Subject: [PATCH 04/10] gnu: Add python-pytest-flakes.
Date: Thu, 21 Apr 2016 23:21:55 +1000

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b5d1005..28b1ee0 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -8780,6 +8780,66 @@ arguments.")
       (native-inputs
        `(("python2-setuptools" ,python2-setuptools))))))
 
+(define-public python-pytest-flakes
+  (package
+    (name "python-pytest-flakes")
+    (version "1.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             
"https://pypi.python.org/packages/source/p/pytest-flakes/pytest-flakes-";
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'post-install-check
+           ;; 'setup.py test' does not run tests
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (setenv "PYTHONPATH"
+                       (string-append
+                        (getenv "PYTHONPATH")
+                        ":"
+                        out
+                        "/lib/python"
+                        (string-take (string-take-right
+                                      (assoc-ref inputs "python") 5) 3)
+                        "/site-packages"))
+               (zero?
+                (system*
+                 "py.test" "test_flakes.py"))))))))
+    (native-inputs
+     `(("python-pytest-pep8" ,python-pytest-pep8)))
+    (propagated-inputs
+     `(("python-pytest-cache" ,python-pytest-cache)
+       ("python-pytest" ,python-pytest)
+       ("python-pyflakes" ,python-pyflakes)))
+    (home-page
+     "https://github.com/fschulze/pytest-flakes";)
+    (synopsis "Pytest plugin to check source code with pyflakes")
+    (description
+     "Pytest-pyflakes is a py.test plugin for efficiently checking python 
source
+with pyflakes.  If you type @code{py.test --flakes} every file ending in
address@hidden will be discovered and run through pyflakes, starting from the
+command line arguments.")
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
+
+(define-public python2-pytest-flakes
+  (let ((base (package-with-python2
+                 (strip-python2-variant python-pytest-flakes))))
+    (package
+      (inherit base)
+      (native-inputs
+       `(,@(package-native-inputs base)
+         ("python2-setuptools" ,python2-setuptools))))))
+
 (define-public python-cysignals
   (package
     (name "python-cysignals")
-- 
2.5.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]