aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorArun Isaac <arunisaac@systemreboot.net>2017-03-19 00:22:55 +0530
committerMarius Bakke <mbakke@fastmail.com>2017-03-20 00:40:31 +0100
commit315944a39334069e0c3cefdb131721ecbc6baa7d (patch)
tree72dcd3e3e05d7f8f88b9143c058394785b231a96 /gnu/packages
parent61550dedf3fd16d6174c48243439b232b9a4ef4f (diff)
downloadguix-315944a39334069e0c3cefdb131721ecbc6baa7d.tar
guix-315944a39334069e0c3cefdb131721ecbc6baa7d.tar.gz
gnu: Add python-pylint.
* gnu/packages/python.scm (python-pylint, python2-pylint): New variables. Signed-off-by: Marius Bakke <mbakke@fastmail.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python.scm59
1 files changed, 59 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 2250061de3..e3a82422de 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13830,3 +13830,62 @@ in other versions.")
unit tests and failing them if the unit test module does not excercise all
statements in the module it tests.")
(license license:gpl3+)))
+
+(define-public python-pylint
+ (package
+ (name "python-pylint")
+ (version "1.6.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/PyCQA/pylint/archive/pylint-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-tox" ,python-tox)))
+ (propagated-inputs
+ `(("python-astroid" ,python-astroid)
+ ("python-isort" ,python-isort)
+ ("python-mccabe" ,python-mccabe)
+ ("python-six" ,python-six)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ ;; Somehow, tests for python2-pylint
+ ;; fail if run from the build directory
+ (let ((work "/tmp/work"))
+ (mkdir-p work)
+ (setenv "PYTHONPATH"
+ (string-append (getenv "PYTHONPATH") ":" work))
+ (copy-recursively "." work)
+ (with-directory-excursion "/tmp"
+ (zero? (system* "python" "-m" "unittest" "discover"
+ "-s" (string-append work "/pylint/test")
+ "-p" "*test_*.py")))))))))
+ (home-page "https://github.com/PyCQA/pylint")
+ (synopsis "Python source code analyzer which looks for coding standard
+errors")
+ (description "Pylint is a Python source code analyzer which looks
+for programming errors, helps enforcing a coding standard and sniffs
+for some code smells (as defined in Martin Fowler's Refactoring book).
+
+Pylint has many rules enabled by default, way too much to silence them
+all on a minimally sized program. It's highly configurable and handle
+pragmas to control it from within your code. Additionally, it is
+possible to write plugins to add your own checks.")
+ (license license:gpl2+)))
+
+(define-public python2-pylint
+ (let ((pylint (package-with-python2 python-pylint)))
+ (package (inherit pylint)
+ (propagated-inputs
+ `(("python2-backports-functools-lru-cache"
+ ,python2-backports-functools-lru-cache)
+ ("python2-configparser" ,python2-configparser)
+ ,@(package-propagated-inputs pylint))))))