[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#27423] [PATCH] gnu: Add python2-xenon
From: |
Muriithi Frederick Muriuki |
Subject: |
[bug#27423] [PATCH] gnu: Add python2-xenon |
Date: |
Sun, 18 Jun 2017 21:53:30 +0300 |
* gnu/packages/python.scm (python2-xenon): New variable.
---
gnu/packages/python.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index c07bbae3e..e84b71701 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -15406,3 +15406,44 @@ window memory map manager.")
(define-public python2-smmap2
(package-with-python2 python-smmap2))
+
+(define-public python2-xenon
+ (package
+ (name "python2-xenon")
+ (version "0.5.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "xenon" version))
+ (sha256
+ (base32
+ "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-pyyaml" ,python2-pyyaml)
+ ("python-radon" ,python2-radon)
+ ("python-requests" ,python2-requests)
+ ("python-flake8" ,python2-flake8)
+ ("python2-httpretty" ,python2-httpretty)
+ ("python-tox" ,python2-tox)))
+ (arguments
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'patch-test-requirements
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Update requirements from dependecy==version
+ ;; to dependency>=version
+ (substitute* "requirements.txt"
+ (("==") ">=")
+ ((",<1.5.0") ""))
+ #t)))))
+ (home-page "https://xenon.readthedocs.org/")
+ (synopsis
+ "Monitor code metrics for Python on your CI server")
+ (description
+ "@code{Xenon} is a monitoring tool based on Radon. It monitors code’s
complexity.
+Ideally, @code{xenon} is run every time code is committed. Through command
line options,
+various thresholds can be set for the complexity of code. It will fail (i.e.
it will
+exit with a non-zero exit code) when any of these requirements is not met.")
+ (license license:expat)))
--
2.13.1