Subject: [PATCH 22/24] gnu: Add python-redbaron.

From: slg <[email-masked]>
Date: Sat, 19 Jun 2021 22:07:40 -0300

* gnu/packages/python-xyz.scm (python-redbaron): New variable.
---
 gnu/packages/python-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6096ba29d1..6dd42d5455 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26115,3 +26115,38 @@ process of its creation (like empty lines, comments, formatting), a FST
 keeps everything and guarantees the operation
 @code{fst_to_code(code_to_fst(source_code)) == source_code}.")
     (license license:lgpl3)))
+
+(define-public python-redbaron
+  (package
+    (name "python-redbaron")
+    (version "0.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "redbaron" version))
+       (sha256
+        (base32
+         "0bqkq0wn20cc3qrcd1ifq74p4m570j345bkq4axl08kbr8whfba7"))))
+    (build-system python-build-system)
+    ;;(native-inputs
+    ;; `(("python-pytest" ,python-pytest))) ;; Uncomment when tests fixed
+    (propagated-inputs
+     `(("python-baron" ,python-baron)))
+    (arguments
+     `(#:tests? #f ;; Syntax error in tests, enable when fixed
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv" "tests/")))))))
+    (home-page "https://github.com/PyCQA/redbaron")
+    (synopsis "Tool for writing code that modifies source code")
+    (description "RedBaron is a python library and tool powerful
+enough to be used into IPython solely that intent to make the process
+of writing code that modify source code as easy and as simple as
+possible.  That include writing custom refactoring, generic refactoring,
+tools, IDE or directly modifying you source code into IPython with a
+higher and more powerful abstraction than the advanced texts
+modification tools that you find in advanced text editors and IDE.")
+    (license license:lgpl3)))
-- 
2.32.0